Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPDataSetReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPDataSetReader.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00036 #ifndef __vtkPDataSetReader_h
00037 #define __vtkPDataSetReader_h
00038 
00039 #include "vtkSource.h"
00040 
00041 class vtkDataSet;
00042 
00043 class VTK_PARALLEL_EXPORT vtkPDataSetReader : public vtkSource
00044 {
00045 public:
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047   vtkTypeRevisionMacro(vtkPDataSetReader,vtkSource);
00048   static vtkPDataSetReader *New();
00049 
00051   virtual int GetNumberOfOutputs() { return 1;}
00052   
00054 
00055   vtkSetStringMacro(FileName);
00056   vtkGetStringMacro(FileName);
00058 
00060 
00062   void SetOutput(vtkDataSet *output);
00063   virtual vtkDataSet* GetOutput();
00064   virtual vtkDataSet* GetOutput(int idx);
00066 
00068   virtual void Update();
00069 
00071 
00073   vtkGetMacro(DataType, int);
00075   
00078   virtual int ReadOutputType();
00079 
00081   int CanReadFile(const char* filename);
00082 
00083 protected:
00084   vtkPDataSetReader();
00085   ~vtkPDataSetReader();
00086 
00087   virtual void ExecuteInformation();
00088   void ReadPVTKFileInformation(ifstream *fp);
00089   void ReadVTKFileInformation(ifstream *fp);
00090 
00091   virtual void Execute();
00092   void PolyDataExecute();
00093   void UnstructuredGridExecute();
00094   void ImageDataExecute();
00095   void StructuredGridExecute();
00096 
00097   void CoverExtent(int ext[6], int *pieceMask);
00098 
00099   vtkDataSet *CheckOutput();
00100   void SetNumberOfPieces(int num);
00101 
00102 //BTX
00103   ifstream *OpenFile(const char *);
00104 //ETX
00105   int ReadXML(ifstream *file, char **block, char **param, char **value);
00106   void SkipFieldData(ifstream *file);
00107 
00108   int VTKFileFlag;
00109   int StructuredFlag;
00110   char *FileName;
00111   int DataType;
00112   int NumberOfPieces;
00113   char **PieceFileNames;
00114   int **PieceExtents;
00115 
00116 private:
00117   vtkPDataSetReader(const vtkPDataSetReader&); // Not implemented
00118   void operator=(const vtkPDataSetReader&); // Not implemented
00119 };
00120 
00121 #endif