IO/vtkXMLPStructuredDataReader.h Source File

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

# IO/vtkXMLPStructuredDataReader.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkXMLPStructuredDataReader.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 __vtkXMLPStructuredDataReader_h
    00041 #define __vtkXMLPStructuredDataReader_h
    00042
    00043 #include "vtkXMLPDataReader.h"
    00044
    00045 class vtkExtentTranslator;
    00046 class vtkTableExtentTranslator;
    00047 class vtkXMLStructuredDataReader;
    00048
    00049 class VTK_IO_EXPORT vtkXMLPStructuredDataReader : public vtkXMLPDataReader
    00050 {
    00051 public:
    00052   vtkTypeRevisionMacro(vtkXMLPStructuredDataReader,vtkXMLPDataReader);
    00053   void PrintSelf(ostream& os, vtkIndent indent);
    00054
    00059   virtual vtkExtentTranslator* GetExtentTranslator();
    00060
    00061 protected:
    00062   vtkXMLPStructuredDataReader();
    00063   ~vtkXMLPStructuredDataReader();
    00064
    00065   vtkIdType GetNumberOfPoints();
    00066   vtkIdType GetNumberOfCells();
    00067   void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
    00068   void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray);
    00069
    00070   virtual void SetOutputExtent(int* extent)=0;
    00071   virtual void GetPieceInputExtent(int index, int* extent)=0;
    00072
    00073   // Pipeline execute data driver.  Called by vtkXMLReader.
    00074   void ReadXMLData();
    00075   int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
    00076
    00077   void SetupEmptyOutput();
    00078   void SetupPieces(int numPieces);
    00079   void DestroyPieces();
    00080   int ReadPiece(vtkXMLDataElement* ePiece);
    00081   int ReadPieceData();
    00082   void CopySubExtent(int* inExtent, int* inDimensions, int* inIncrements,
    00083                      int* outExtent, int* outDimensions, int* outIncrements,
    00084                      int* subExtent, int* subDimensions,
    00085                      vtkDataArray* inArray, vtkDataArray* outArray);
    00086
    00087   vtkTableExtentTranslator* ExtentTranslator;
    00088
    00089   // The extent to be updated in the output.
    00090   int UpdateExtent[6];
    00091   int PointDimensions[3];
    00092   int PointIncrements[3];
    00093   int CellDimensions[3];
    00094   int CellIncrements[3];
    00095
    00096   // The extent currently being read from a piece.
    00097   int SubExtent[6];
    00098   int SubPointDimensions[3];
    00099   int SubCellDimensions[3];
    00100   int SubPieceExtent[6];
    00101   int SubPiecePointDimensions[3];
    00102   int SubPiecePointIncrements[3];
    00103   int SubPieceCellDimensions[3];
    00104   int SubPieceCellIncrements[3];
    00105
    00106   // Information per-piece.
    00107   int* PieceExtents;
    00108
    00109 private:
    00110   vtkXMLPStructuredDataReader(const vtkXMLPStructuredDataReader&);  // Not implemented.
    00111   void operator=(const vtkXMLPStructuredDataReader&);  // Not implemented.
    00112 };
    00113
    00114 #endif