00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkXMLPStructuredGridReader.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 =========================================================================*/ 00028 #ifndef __vtkXMLPStructuredGridReader_h 00029 #define __vtkXMLPStructuredGridReader_h 00030 00031 #include "vtkXMLPStructuredDataReader.h" 00032 00033 class vtkStructuredGrid; 00034 00035 class VTK_IO_EXPORT vtkXMLPStructuredGridReader : public vtkXMLPStructuredDataReader 00036 { 00037 public: 00038 vtkTypeMacro(vtkXMLPStructuredGridReader,vtkXMLPStructuredDataReader); 00039 void PrintSelf(ostream& os, vtkIndent indent); 00040 static vtkXMLPStructuredGridReader *New(); 00041 00043 vtkStructuredGrid *GetOutput(); 00044 00046 vtkStructuredGrid* GetOutput(int idx); 00047 00048 protected: 00049 vtkXMLPStructuredGridReader(); 00050 ~vtkXMLPStructuredGridReader(); 00051 00052 vtkStructuredGrid* GetPieceInput(int index); 00053 00054 void SetupEmptyOutput(); 00055 const char* GetDataSetName(); 00056 void SetOutputExtent(int* extent); 00057 void GetPieceInputExtent(int index, int* extent); 00058 int ReadPrimaryElement(vtkXMLDataElement* ePrimary); 00059 void SetupOutputData(); 00060 int ReadPieceData(); 00061 vtkXMLDataReader* CreatePieceReader(); 00062 virtual int FillOutputPortInformation(int, vtkInformation*); 00063 00064 // The PPoints element with point information. 00065 vtkXMLDataElement* PPointsElement; 00066 00067 private: 00068 vtkXMLPStructuredGridReader(const vtkXMLPStructuredGridReader&); // Not implemented. 00069 void operator=(const vtkXMLPStructuredGridReader&); // Not implemented. 00070 }; 00071 00072 #endif