00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXMLStructuredGridReader.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00034 #ifndef __vtkXMLStructuredGridReader_h 00035 #define __vtkXMLStructuredGridReader_h 00036 00037 #include "vtkXMLStructuredDataReader.h" 00038 00039 class vtkStructuredGrid; 00040 00041 class VTK_IO_EXPORT vtkXMLStructuredGridReader : public vtkXMLStructuredDataReader 00042 { 00043 public: 00044 vtkTypeMacro(vtkXMLStructuredGridReader,vtkXMLStructuredDataReader); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 static vtkXMLStructuredGridReader *New(); 00047 00049 00050 vtkStructuredGrid *GetOutput(); 00051 vtkStructuredGrid *GetOutput(int idx); 00053 00054 protected: 00055 vtkXMLStructuredGridReader(); 00056 ~vtkXMLStructuredGridReader(); 00057 00058 const char* GetDataSetName(); 00059 void SetOutputExtent(int* extent); 00060 00061 void SetupPieces(int numPieces); 00062 void DestroyPieces(); 00063 void SetupOutputData(); 00064 00065 int ReadPiece(vtkXMLDataElement* ePiece); 00066 int ReadPieceData(); 00067 virtual int FillOutputPortInformation(int, vtkInformation*); 00068 00069 // The elements representing the points for each piece. 00070 vtkXMLDataElement** PointElements; 00071 00072 private: 00073 vtkXMLStructuredGridReader(const vtkXMLStructuredGridReader&); // Not implemented. 00074 void operator=(const vtkXMLStructuredGridReader&); // Not implemented. 00075 }; 00076 00077 #endif