vtkXMLStructuredDataReader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkXMLStructuredDataReader_h
00037 #define __vtkXMLStructuredDataReader_h
00038
00039 #include "vtkXMLDataReader.h"
00040
00041
00042 class VTK_IO_EXPORT vtkXMLStructuredDataReader : public vtkXMLDataReader
00043 {
00044 public:
00045 vtkTypeRevisionMacro(vtkXMLStructuredDataReader,vtkXMLDataReader);
00046 void PrintSelf(ostream& os, vtkIndent indent);
00047
00049 virtual vtkIdType GetNumberOfPoints();
00050
00052 virtual vtkIdType GetNumberOfCells();
00053
00055
00059 vtkSetMacro(WholeSlices, int);
00060 vtkGetMacro(WholeSlices, int);
00061 vtkBooleanMacro(WholeSlices, int);
00063
00064 protected:
00065 vtkXMLStructuredDataReader();
00066 ~vtkXMLStructuredDataReader();
00067
00068 virtual void SetOutputExtent(int* extent)=0;
00069 int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00070
00071
00072 void ReadXMLData();
00073
00074
00075
00076 int* PieceExtents;
00077 int* PiecePointDimensions;
00078 int* PiecePointIncrements;
00079 int* PieceCellDimensions;
00080 int* PieceCellIncrements;
00081
00082
00083 int WholeSlices;
00084
00085
00086 int UpdateExtent[6];
00087 int PointDimensions[3];
00088 int CellDimensions[3];
00089 int PointIncrements[3];
00090 int CellIncrements[3];
00091
00092
00093 int SubExtent[6];
00094 int SubPointDimensions[3];
00095 int SubCellDimensions[3];
00096
00097
00098 void SetupEmptyOutput();
00099 void SetupPieces(int numPieces);
00100 void DestroyPieces();
00101 int ReadArrayForPoints(vtkXMLDataElement* da, vtkDataArray* outArray);
00102 int ReadArrayForCells(vtkXMLDataElement* da, vtkDataArray* outArray);
00103
00104
00105 int ReadPiece(vtkXMLDataElement* ePiece);
00106 int ReadSubExtent(int* inExtent, int* inDimensions, int* inIncrements,
00107 int* outExtent, int* outDimensions, int* outIncrements,
00108 int* subExtent, int* subDimensions, vtkXMLDataElement* da,
00109 vtkDataArray* array);
00110
00111 private:
00112 vtkXMLStructuredDataReader(const vtkXMLStructuredDataReader&);
00113 void operator=(const vtkXMLStructuredDataReader&);
00114 };
00115
00116 #endif