00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkXMLPStructuredDataReader_h
00027 #define __vtkXMLPStructuredDataReader_h
00028
00029 #include "vtkXMLPDataReader.h"
00030
00031 class vtkExtentSplitter;
00032 class vtkExtentTranslator;
00033
00034 class vtkXMLStructuredDataReader;
00035
00036 class VTK_IO_EXPORT vtkXMLPStructuredDataReader : public vtkXMLPDataReader
00037 {
00038 public:
00039 vtkTypeMacro(vtkXMLPStructuredDataReader,vtkXMLPDataReader);
00040 void PrintSelf(ostream& os, vtkIndent indent);
00041
00046 virtual vtkExtentTranslator* GetExtentTranslator();
00047
00048
00049
00050 virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
00051 protected:
00052 vtkXMLPStructuredDataReader();
00053 ~vtkXMLPStructuredDataReader();
00054
00055 vtkIdType GetNumberOfPoints();
00056 vtkIdType GetNumberOfCells();
00057 void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
00058 void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray);
00059
00060 virtual void SetOutputExtent(int* extent)=0;
00061 virtual void GetPieceInputExtent(int index, int* extent)=0;
00062
00063
00064 void ReadXMLData();
00065 int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00066
00067 void SetupOutputData();
00068
00069 void SetupPieces(int numPieces);
00070 void DestroyPieces();
00071 int ReadPiece(vtkXMLDataElement* ePiece);
00072 int ReadPieceData();
00073 void CopySubExtent(int* inExtent, int* inDimensions, vtkIdType* inIncrements,
00074 int* outExtent,int* outDimensions,vtkIdType* outIncrements,
00075 int* subExtent, int* subDimensions,
00076 vtkDataArray* inArray, vtkDataArray* outArray);
00077 int ComputePieceSubExtents();
00078
00079
00080 vtkExtentSplitter* ExtentSplitter;
00081
00082
00083 int UpdateExtent[6];
00084 int PointDimensions[3];
00085 vtkIdType PointIncrements[3];
00086 int CellDimensions[3];
00087 vtkIdType CellIncrements[3];
00088
00089
00090 int SubExtent[6];
00091 int SubPointDimensions[3];
00092 int SubCellDimensions[3];
00093 int SubPieceExtent[6];
00094 int SubPiecePointDimensions[3];
00095 vtkIdType SubPiecePointIncrements[3];
00096 int SubPieceCellDimensions[3];
00097 vtkIdType SubPieceCellIncrements[3];
00098
00099
00100 int* PieceExtents;
00101
00102 virtual int RequestInformation(vtkInformation *request,
00103 vtkInformationVector **inputVector,
00104 vtkInformationVector *outputVector);
00105
00106 private:
00107 vtkXMLPStructuredDataReader(const vtkXMLPStructuredDataReader&);
00108 void operator=(const vtkXMLPStructuredDataReader&);
00109 };
00110
00111 #endif