00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkXMLStructuredGridReader.h,v $ 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 vtkTypeRevisionMacro(vtkXMLStructuredGridReader,vtkXMLStructuredDataReader); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 static vtkXMLStructuredGridReader *New(); 00047 00049 00050 void SetOutput(vtkStructuredGrid *output); 00051 vtkStructuredGrid *GetOutput(); 00052 vtkStructuredGrid *GetOutput(int idx); 00054 00055 protected: 00056 vtkXMLStructuredGridReader(); 00057 ~vtkXMLStructuredGridReader(); 00058 00059 const char* GetDataSetName(); 00060 void SetOutputExtent(int* extent); 00061 00062 void SetupPieces(int numPieces); 00063 void DestroyPieces(); 00064 void SetupOutputData(); 00065 00066 int ReadPiece(vtkXMLDataElement* ePiece); 00067 int ReadPieceData(); 00068 virtual int FillOutputPortInformation(int, vtkInformation*); 00069 00070 // The elements representing the points for each piece. 00071 vtkXMLDataElement** PointElements; 00072 00073 private: 00074 vtkXMLStructuredGridReader(const vtkXMLStructuredGridReader&); // Not implemented. 00075 void operator=(const vtkXMLStructuredGridReader&); // Not implemented. 00076 }; 00077 00078 #endif