Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
IO/vtkXMLUnstructuredDataReader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00039 #ifndef __vtkXMLUnstructuredDataReader_h
00040 #define __vtkXMLUnstructuredDataReader_h
00041
00042 #include "vtkXMLDataReader.h"
00043
00044 class vtkCellArray;
00045 class vtkIdTypeArray;
00046 class vtkPointSet;
00047 class vtkUnsignedCharArray;
00048
00049 class VTK_IO_EXPORT vtkXMLUnstructuredDataReader : public vtkXMLDataReader
00050 {
00051 public:
00052 vtkTypeRevisionMacro(vtkXMLUnstructuredDataReader,vtkXMLDataReader);
00053 void PrintSelf(ostream& os, vtkIndent indent);
00054
00056 virtual vtkIdType GetNumberOfPoints();
00057
00059 virtual vtkIdType GetNumberOfCells();
00060
00065 void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
00066
00067 protected:
00068 vtkXMLUnstructuredDataReader();
00069 ~vtkXMLUnstructuredDataReader();
00070
00071 vtkPointSet* GetOutputAsPointSet();
00072 vtkXMLDataElement* FindDataArrayWithName(vtkXMLDataElement* eParent,
00073 const char* name);
00074 vtkIdTypeArray* ConvertToIdTypeArray(vtkDataArray* a);
00075 vtkUnsignedCharArray* ConvertToUnsignedCharArray(vtkDataArray* a);
00076
00077
00078 void ReadXMLData();
00079
00080 virtual void SetupEmptyOutput();
00081 virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
00082 int& ghostLevel)=0;
00083 virtual void SetupOutputTotals();
00084 virtual void SetupNextPiece();
00085 void SetupPieces(int numPieces);
00086 void DestroyPieces();
00087
00088 void SetupOutputInformation();
00089 void SetupOutputData();
00090 int ReadPiece(vtkXMLDataElement* ePiece);
00091 int ReadPieceData();
00092 int ReadCellArray(vtkIdType numberOfCells, vtkIdType totalNumberOfCells,
00093 vtkXMLDataElement* eCells, vtkCellArray* outCells);
00094
00095
00096 int ReadArrayForPoints(vtkXMLDataElement* da, vtkDataArray* outArray);
00097
00098
00099 int UpdatePiece;
00100 int UpdateNumberOfPieces;
00101 int UpdateGhostLevel;
00102
00103
00104 int StartPiece;
00105 int EndPiece;
00106 vtkIdType TotalNumberOfPoints;
00107 vtkIdType TotalNumberOfCells;
00108 vtkIdType StartPoint;
00109
00110
00111 vtkXMLDataElement** PointElements;
00112 vtkIdType* NumberOfPoints;
00113
00114 private:
00115 vtkXMLUnstructuredDataReader(const vtkXMLUnstructuredDataReader&);
00116 void operator=(const vtkXMLUnstructuredDataReader&);
00117 };
00118
00119 #endif