IO/vtkXMLStructuredDataReader.h Source File

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# IO/vtkXMLStructuredDataReader.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkXMLStructuredDataReader.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00040 #ifndef __vtkXMLStructuredDataReader_h
    00041 #define __vtkXMLStructuredDataReader_h
    00042
    00043 #include "vtkXMLDataReader.h"
    00044
    00045
    00046 class VTK_IO_EXPORT vtkXMLStructuredDataReader : public vtkXMLDataReader
    00047 {
    00048 public:
    00049   vtkTypeRevisionMacro(vtkXMLStructuredDataReader,vtkXMLDataReader);
    00050   void PrintSelf(ostream& os, vtkIndent indent);
    00051
    00053   virtual vtkIdType GetNumberOfPoints();
    00054
    00056   virtual vtkIdType GetNumberOfCells();
    00057
    00059
    00063   vtkSetMacro(WholeSlices, int);
    00064   vtkGetMacro(WholeSlices, int);
    00065   vtkBooleanMacro(WholeSlices, int);
    00067
    00068 protected:
    00069   vtkXMLStructuredDataReader();
    00070   ~vtkXMLStructuredDataReader();
    00071
    00072   virtual void SetOutputExtent(int* extent)=0;
    00073   int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
    00074
    00075   // Pipeline execute data driver.  Called by vtkXMLReader.
    00076   void ReadXMLData();
    00077
    00078   // Internal representation of pieces in the file that may have come
    00079   // from a streamed write.
    00080   int* PieceExtents;
    00081   int* PiecePointDimensions;
    00082   int* PiecePointIncrements;
    00083   int* PieceCellDimensions;
    00084   int* PieceCellIncrements;
    00085
    00086   // Whether to read in whole slices mode.
    00087   int WholeSlices;
    00088
    00089   // The update extent and corresponding increments and dimensions.
    00090   int UpdateExtent[6];
    00091   int PointDimensions[3];
    00092   int CellDimensions[3];
    00093   int PointIncrements[3];
    00094   int CellIncrements[3];
    00095
    00096   // The extent currently being read.
    00097   int SubExtent[6];
    00098   int SubPointDimensions[3];
    00099   int SubCellDimensions[3];
    00100
    00101   // Override methods from superclass.
    00102   void SetupEmptyOutput();
    00103   void SetupPieces(int numPieces);
    00104   void DestroyPieces();
    00105   int ReadArrayForPoints(vtkXMLDataElement* da, vtkDataArray* outArray);
    00106   int ReadArrayForCells(vtkXMLDataElement* da, vtkDataArray* outArray);
    00107
    00108   // Internal utility methods.
    00109   int ReadPiece(vtkXMLDataElement* ePiece);
    00110   int ReadSubExtent(int* inExtent, int* inDimensions, int* inIncrements,
    00111                     int* outExtent, int* outDimensions, int* outIncrements,
    00112                     int* subExtent, int* subDimensions, vtkXMLDataElement* da,
    00113                     vtkDataArray* array);
    00114
    00115 private:
    00116   vtkXMLStructuredDataReader(const vtkXMLStructuredDataReader&);  // Not implemented.
    00117   void operator=(const vtkXMLStructuredDataReader&);  // Not implemented.
    00118 };
    00119
    00120 #endif