00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00025 #ifndef __vtkXMLPUnstructuredDataReader_h
00026 #define __vtkXMLPUnstructuredDataReader_h
00027
00028 #include "vtkXMLPDataReader.h"
00029
00030 class vtkPointSet;
00031 class vtkCellArray;
00032 class vtkXMLUnstructuredDataReader;
00033
00034 class VTK_IO_EXPORT vtkXMLPUnstructuredDataReader : public vtkXMLPDataReader
00035 {
00036 public:
00037 vtkTypeRevisionMacro(vtkXMLPUnstructuredDataReader,vtkXMLPDataReader);
00038 void PrintSelf(ostream& os, vtkIndent indent);
00039
00040
00041
00042 virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
00043
00044 protected:
00045 vtkXMLPUnstructuredDataReader();
00046 ~vtkXMLPUnstructuredDataReader();
00047
00048 vtkPointSet* GetOutputAsPointSet();
00049 vtkPointSet* GetPieceInputAsPointSet(int piece);
00050 virtual void SetupOutputTotals();
00051 virtual void SetupNextPiece();
00052 vtkIdType GetNumberOfPoints();
00053 vtkIdType GetNumberOfCells();
00054 void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
00055
00056 void SetupEmptyOutput();
00057
00058
00059 void SetupOutputInformation(vtkInformation *outInfo);
00060
00061 void SetupOutputData();
00062 virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
00063 int& ghostLevel)=0;
00064
00065
00066 void ReadXMLData();
00067 int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00068 void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
00069
00070 int ReadPieceData();
00071 void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells,
00072 vtkCellArray* outCells);
00073
00074
00075
00076 virtual vtkIdType GetNumberOfPointsInPiece(int piece);
00077 virtual vtkIdType GetNumberOfCellsInPiece(int piece);
00078
00079
00080 int UpdatePiece;
00081 int UpdateNumberOfPieces;
00082 int UpdateGhostLevel;
00083
00084
00085 int StartPiece;
00086 int EndPiece;
00087 vtkIdType TotalNumberOfPoints;
00088 vtkIdType TotalNumberOfCells;
00089 vtkIdType StartPoint;
00090
00091
00092 vtkXMLDataElement* PPointsElement;
00093
00094 private:
00095 vtkXMLPUnstructuredDataReader(const vtkXMLPUnstructuredDataReader&);
00096 void operator=(const vtkXMLPUnstructuredDataReader&);
00097 };
00098
00099 #endif