VTK
dox/IO/XML/vtkXMLPRectilinearGridReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkXMLPRectilinearGridReader.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 __vtkXMLPRectilinearGridReader_h
00029 #define __vtkXMLPRectilinearGridReader_h
00030 
00031 #include "vtkIOXMLModule.h" // For export macro
00032 #include "vtkXMLPStructuredDataReader.h"
00033 
00034 class vtkRectilinearGrid;
00035 
00036 class VTKIOXML_EXPORT vtkXMLPRectilinearGridReader : public vtkXMLPStructuredDataReader
00037 {
00038 public:
00039   vtkTypeMacro(vtkXMLPRectilinearGridReader,vtkXMLPStructuredDataReader);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041   static vtkXMLPRectilinearGridReader *New();
00042 
00044 
00045   vtkRectilinearGrid *GetOutput();
00046   vtkRectilinearGrid *GetOutput(int idx);
00048 
00049 protected:
00050   vtkXMLPRectilinearGridReader();
00051   ~vtkXMLPRectilinearGridReader();
00052 
00053   vtkRectilinearGrid* GetPieceInput(int index);
00054 
00055   void SetupEmptyOutput();
00056   const char* GetDataSetName();
00057   void SetOutputExtent(int* extent);
00058   void GetPieceInputExtent(int index, int* extent);
00059   int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00060   void SetupOutputData();
00061   int ReadPieceData();
00062   vtkXMLDataReader* CreatePieceReader();
00063   void CopySubCoordinates(int* inBounds, int* outBounds, int* subBounds,
00064                           vtkDataArray* inArray, vtkDataArray* outArray);
00065   virtual int FillOutputPortInformation(int, vtkInformation*);
00066 
00067   // The PCoordinates element with coordinate information.
00068   vtkXMLDataElement* PCoordinatesElement;
00069 
00070 private:
00071   vtkXMLPRectilinearGridReader(const vtkXMLPRectilinearGridReader&);  // Not implemented.
00072   void operator=(const vtkXMLPRectilinearGridReader&);  // Not implemented.
00073 };
00074 
00075 #endif