• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/IO/vtkXMLStructuredDataReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLStructuredDataReader.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 =========================================================================*/
00026 #ifndef __vtkXMLStructuredDataReader_h
00027 #define __vtkXMLStructuredDataReader_h
00028 
00029 #include "vtkXMLDataReader.h"
00030 
00031 
00032 class VTK_IO_EXPORT vtkXMLStructuredDataReader : public vtkXMLDataReader
00033 {
00034 public:
00035   vtkTypeRevisionMacro(vtkXMLStructuredDataReader,vtkXMLDataReader);
00036   void PrintSelf(ostream& os, vtkIndent indent);  
00037   
00039   virtual vtkIdType GetNumberOfPoints();
00040   
00042   virtual vtkIdType GetNumberOfCells();
00043   
00045 
00049   vtkSetMacro(WholeSlices, int);
00050   vtkGetMacro(WholeSlices, int);
00051   vtkBooleanMacro(WholeSlices, int);
00053   
00056   virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
00057 protected:
00058   vtkXMLStructuredDataReader();
00059   ~vtkXMLStructuredDataReader();
00060   
00061   virtual void SetOutputExtent(int* extent)=0;
00062   int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00063   
00064   // Pipeline execute data driver.  Called by vtkXMLReader.
00065   void ReadXMLData();
00066   
00067   // Internal representation of pieces in the file that may have come
00068   // from a streamed write.
00069   int* PieceExtents;
00070   int* PiecePointDimensions;
00071   vtkIdType* PiecePointIncrements;
00072   int* PieceCellDimensions;
00073   vtkIdType* PieceCellIncrements;
00074   
00075   // Whether to read in whole slices mode.
00076   int WholeSlices;
00077   
00078   // The update extent and corresponding increments and dimensions.
00079   int UpdateExtent[6];
00080   int PointDimensions[3];
00081   int CellDimensions[3];
00082   vtkIdType PointIncrements[3];
00083   vtkIdType CellIncrements[3];
00084 
00085   int WholeExtent[6];
00086   
00087   // The extent currently being read.
00088   int SubExtent[6];
00089   int SubPointDimensions[3];
00090   int SubCellDimensions[3];
00091   
00092   // Override methods from superclass.
00093   void SetupEmptyOutput();
00094   void SetupPieces(int numPieces);
00095   void DestroyPieces();
00096   virtual int ReadArrayForPoints(vtkXMLDataElement* da, 
00097     vtkAbstractArray* outArray);
00098   virtual int ReadArrayForCells(vtkXMLDataElement* da, 
00099     vtkAbstractArray* outArray);
00100   
00101   // Internal utility methods.
00102   int ReadPiece(vtkXMLDataElement* ePiece);
00103   virtual int ReadSubExtent(
00104       int* inExtent, int* inDimensions, vtkIdType* inIncrements,
00105       int* outExtent,int* outDimensions,vtkIdType* outIncrements,
00106       int* subExtent, int* subDimensions, vtkXMLDataElement* da,
00107       vtkAbstractArray* array);
00108   
00109 private:
00110   vtkXMLStructuredDataReader(const vtkXMLStructuredDataReader&);  // Not implemented.
00111   void operator=(const vtkXMLStructuredDataReader&);  // Not implemented.
00112 };
00113 
00114 #endif

Generated by  doxygen 1.7.1