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

vtkXMLPStructuredDataReader.h

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

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