Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/IO/vtkXMLUnstructuredDataReader.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkXMLUnstructuredDataReader.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00029 #ifndef __vtkXMLUnstructuredDataReader_h 00030 #define __vtkXMLUnstructuredDataReader_h 00031 00032 #include "vtkXMLDataReader.h" 00033 00034 class vtkCellArray; 00035 class vtkIdTypeArray; 00036 class vtkPointSet; 00037 class vtkUnsignedCharArray; 00038 00039 class VTK_IO_EXPORT vtkXMLUnstructuredDataReader : public vtkXMLDataReader 00040 { 00041 public: 00042 vtkTypeRevisionMacro(vtkXMLUnstructuredDataReader,vtkXMLDataReader); 00043 void PrintSelf(ostream& os, vtkIndent indent); 00044 00046 virtual vtkIdType GetNumberOfPoints(); 00047 00049 virtual vtkIdType GetNumberOfCells(); 00050 00055 void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel); 00056 00057 protected: 00058 vtkXMLUnstructuredDataReader(); 00059 ~vtkXMLUnstructuredDataReader(); 00060 00061 vtkPointSet* GetOutputAsPointSet(); 00062 vtkXMLDataElement* FindDataArrayWithName(vtkXMLDataElement* eParent, 00063 const char* name); 00064 vtkIdTypeArray* ConvertToIdTypeArray(vtkDataArray* a); 00065 vtkUnsignedCharArray* ConvertToUnsignedCharArray(vtkDataArray* a); 00066 00067 // Pipeline execute data driver. Called by vtkXMLReader. 00068 void ReadXMLData(); 00069 00070 virtual void SetupEmptyOutput(); 00071 virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces, 00072 int& ghostLevel)=0; 00073 virtual void SetupOutputTotals(); 00074 virtual void SetupNextPiece(); 00075 void SetupPieces(int numPieces); 00076 void DestroyPieces(); 00077 00078 void SetupOutputInformation(); 00079 void SetupOutputData(); 00080 int ReadPiece(vtkXMLDataElement* ePiece); 00081 int ReadPieceData(); 00082 int ReadCellArray(vtkIdType numberOfCells, vtkIdType totalNumberOfCells, 00083 vtkXMLDataElement* eCells, vtkCellArray* outCells); 00084 00085 // Read a data array whose tuples coorrespond to points. 00086 int ReadArrayForPoints(vtkXMLDataElement* da, vtkDataArray* outArray); 00087 00088 // The update request. 00089 int UpdatePiece; 00090 int UpdateNumberOfPieces; 00091 int UpdateGhostLevel; 00092 00093 // The range of pieces from the file that will form the UpdatePiece. 00094 int StartPiece; 00095 int EndPiece; 00096 vtkIdType TotalNumberOfPoints; 00097 vtkIdType TotalNumberOfCells; 00098 vtkIdType StartPoint; 00099 00100 // The Points element for each piece. 00101 vtkXMLDataElement** PointElements; 00102 vtkIdType* NumberOfPoints; 00103 00104 private: 00105 vtkXMLUnstructuredDataReader(const vtkXMLUnstructuredDataReader&); // Not implemented. 00106 void operator=(const vtkXMLUnstructuredDataReader&); // Not implemented. 00107 }; 00108 00109 #endif