00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkXMLDataReader_h
00027 #define __vtkXMLDataReader_h
00028
00029 #include "vtkXMLReader.h"
00030
00031 class VTK_IO_EXPORT vtkXMLDataReader : public vtkXMLReader
00032 {
00033 public:
00034 vtkTypeMacro(vtkXMLDataReader,vtkXMLReader);
00035 void PrintSelf(ostream& os, vtkIndent indent);
00036
00038 virtual vtkIdType GetNumberOfPoints()=0;
00039
00041 virtual vtkIdType GetNumberOfCells()=0;
00042
00043
00044
00045 virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
00046
00047 protected:
00048 vtkXMLDataReader();
00049 ~vtkXMLDataReader();
00050
00051 int SetUpdateExtentInfo(vtkXMLDataElement *eDSA,
00052 vtkInformationVector *infoVector,
00053 int piece, int numPieces);
00054
00055
00056 virtual void CreateXMLParser();
00057 virtual void DestroyXMLParser();
00058 virtual void SetupOutputInformation(vtkInformation *outInfo);
00059 virtual void SetupUpdateExtentInformation(vtkInformation *outInfo);
00060
00061 int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00062 void SetupOutputData();
00063
00064
00065 virtual void SetupPieces(int numPieces);
00066 virtual void DestroyPieces();
00067
00068
00069 int ReadPiece(vtkXMLDataElement* ePiece, int piece);
00070 virtual int ReadPiece(vtkXMLDataElement* ePiece);
00071
00072
00073 int ReadPieceData(int piece);
00074 virtual int ReadPieceData();
00075
00076 virtual void ReadXMLData();
00077
00078
00079 virtual int ReadArrayForPoints(vtkXMLDataElement* da,
00080 vtkAbstractArray* outArray);
00081 virtual int ReadArrayForCells(vtkXMLDataElement* da,
00082 vtkAbstractArray* outArray);
00083
00084
00085
00086
00087
00088 int ReadArrayValues(vtkXMLDataElement* da, vtkIdType arrayIndex, vtkAbstractArray* array,
00089 vtkIdType startIndex, vtkIdType numValues);
00090
00091
00092
00093
00094 static void DataProgressCallbackFunction(vtkObject*, unsigned long, void*,
00095 void*);
00096
00097 virtual void DataProgressCallback();
00098
00099
00100 int NumberOfPieces;
00101
00102
00103 vtkXMLDataElement** PointDataElements;
00104 vtkXMLDataElement** CellDataElements;
00105
00106
00107 int Piece;
00108
00109
00110
00111 int NumberOfPointArrays;
00112 int NumberOfCellArrays;
00113
00114
00115
00116 int InReadData;
00117
00118
00119 vtkCallbackCommand* DataProgressObserver;
00120
00121
00122
00123 int *PointDataTimeStep;
00124 unsigned long *PointDataOffset;
00125 int PointDataNeedToReadTimeStep(vtkXMLDataElement *eNested);
00126
00127
00128 int *CellDataTimeStep;
00129 unsigned long *CellDataOffset;
00130 int CellDataNeedToReadTimeStep(vtkXMLDataElement *eNested);
00131
00132 private:
00133 vtkXMLDataReader(const vtkXMLDataReader&);
00134 void operator=(const vtkXMLDataReader&);
00135 };
00136
00137 #endif