VTK
dox/IO/vtkXMLRectilinearGridReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkXMLRectilinearGridReader.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 __vtkXMLRectilinearGridReader_h
00035 #define __vtkXMLRectilinearGridReader_h
00036 
00037 #include "vtkXMLStructuredDataReader.h"
00038 
00039 class vtkRectilinearGrid;
00040 
00041 class VTK_IO_EXPORT vtkXMLRectilinearGridReader : public vtkXMLStructuredDataReader
00042 {
00043 public:
00044   vtkTypeMacro(vtkXMLRectilinearGridReader,vtkXMLStructuredDataReader);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046   static vtkXMLRectilinearGridReader *New();
00047   
00049 
00050   vtkRectilinearGrid *GetOutput();
00051   vtkRectilinearGrid *GetOutput(int idx);
00053   
00054 protected:
00055   vtkXMLRectilinearGridReader();
00056   ~vtkXMLRectilinearGridReader();  
00057   
00058   const char* GetDataSetName();
00059   void SetOutputExtent(int* extent);
00060   
00061   void SetupPieces(int numPieces);
00062   void DestroyPieces();
00063   void SetupOutputData();
00064   int ReadPiece(vtkXMLDataElement* ePiece);
00065   int ReadPieceData();
00066   int ReadSubCoordinates(int* inBounds, int* outBounds, int* subBounds,
00067                          vtkXMLDataElement* da, vtkDataArray* array);
00068   virtual int FillOutputPortInformation(int, vtkInformation*);
00069   
00070   // The elements representing the coordinate arrays for each piece.
00071   vtkXMLDataElement** CoordinateElements;
00072   
00073 private:
00074   vtkXMLRectilinearGridReader(const vtkXMLRectilinearGridReader&);  // Not implemented.
00075   void operator=(const vtkXMLRectilinearGridReader&);  // Not implemented.
00076 };
00077 
00078 #endif