VTK
dox/IO/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 "vtkXMLPStructuredDataReader.h"
00032 
00033 class vtkRectilinearGrid;
00034 
00035 class VTK_IO_EXPORT vtkXMLPRectilinearGridReader : public vtkXMLPStructuredDataReader
00036 {
00037 public:
00038   vtkTypeMacro(vtkXMLPRectilinearGridReader,vtkXMLPStructuredDataReader);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040   static vtkXMLPRectilinearGridReader *New();
00041   
00043 
00044   vtkRectilinearGrid *GetOutput();
00045   vtkRectilinearGrid *GetOutput(int idx);
00047   
00048 protected:
00049   vtkXMLPRectilinearGridReader();
00050   ~vtkXMLPRectilinearGridReader();
00051   
00052   vtkRectilinearGrid* 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   void CopySubCoordinates(int* inBounds, int* outBounds, int* subBounds,
00063                           vtkDataArray* inArray, vtkDataArray* outArray);
00064   virtual int FillOutputPortInformation(int, vtkInformation*);
00065 
00066   // The PCoordinates element with coordinate information.
00067   vtkXMLDataElement* PCoordinatesElement;
00068 
00069 private:
00070   vtkXMLPRectilinearGridReader(const vtkXMLPRectilinearGridReader&);  // Not implemented.
00071   void operator=(const vtkXMLPRectilinearGridReader&);  // Not implemented.
00072 };
00073 
00074 #endif