Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

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   // The extent currently being read.
00086   int SubExtent[6];
00087   int SubPointDimensions[3];
00088   int SubCellDimensions[3];
00089   
00090   // Override methods from superclass.
00091   void SetupEmptyOutput();
00092   void SetupPieces(int numPieces);
00093   void DestroyPieces();
00094   int ReadArrayForPoints(vtkXMLDataElement* da, vtkDataArray* outArray);
00095   int ReadArrayForCells(vtkXMLDataElement* da, vtkDataArray* outArray);
00096   
00097   // Internal utility methods.
00098   int ReadPiece(vtkXMLDataElement* ePiece);
00099   int ReadSubExtent(int* inExtent, int* inDimensions, vtkIdType* inIncrements,
00100                     int* outExtent,int* outDimensions,vtkIdType* outIncrements,
00101                     int* subExtent, int* subDimensions, vtkXMLDataElement* da,
00102                     vtkDataArray* array);
00103   
00104 private:
00105   vtkXMLStructuredDataReader(const vtkXMLStructuredDataReader&);  // Not implemented.
00106   void operator=(const vtkXMLStructuredDataReader&);  // Not implemented.
00107 };
00108 
00109 #endif

Generated on Mon Jan 21 23:07:32 2008 for VTK by  doxygen 1.4.3-20050530