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

vtkXMLPUnstructuredDataReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLPUnstructuredDataReader.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 =========================================================================*/
00035 #ifndef __vtkXMLPUnstructuredDataReader_h
00036 #define __vtkXMLPUnstructuredDataReader_h
00037 
00038 #include "vtkXMLPDataReader.h"
00039 
00040 class vtkPointSet;
00041 class vtkCellArray;
00042 class vtkXMLUnstructuredDataReader;
00043 
00044 class VTK_IO_EXPORT vtkXMLPUnstructuredDataReader : public vtkXMLPDataReader
00045 {
00046 public:
00047   vtkTypeRevisionMacro(vtkXMLPUnstructuredDataReader,vtkXMLPDataReader);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049   
00050 protected:
00051   vtkXMLPUnstructuredDataReader();
00052   ~vtkXMLPUnstructuredDataReader();
00053   
00054   vtkPointSet* GetOutputAsPointSet();
00055   vtkPointSet* GetPieceInputAsPointSet(int piece);
00056   virtual void SetupOutputTotals();
00057   virtual void SetupNextPiece();
00058   vtkIdType GetNumberOfPoints();
00059   vtkIdType GetNumberOfCells();
00060   void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
00061   
00062   void SetupEmptyOutput();
00063   void SetupOutputInformation();
00064   void SetupOutputData();
00065   virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
00066                                      int& ghostLevel)=0;
00067   
00068   // Pipeline execute data driver.  Called by vtkXMLReader.
00069   void ReadXMLData();  
00070   int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00071   void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
00072   
00073   int ReadPieceData();
00074   void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells,
00075                      vtkCellArray* outCells);
00076   
00077   // Get the number of points/cells in the given piece.  Valid after
00078   // UpdateInformation.
00079   virtual vtkIdType GetNumberOfPointsInPiece(int piece);
00080   virtual vtkIdType GetNumberOfCellsInPiece(int piece);
00081   
00082   // The update request.
00083   int UpdatePiece;
00084   int UpdateNumberOfPieces;
00085   int UpdateGhostLevel;
00086   
00087   // The range of pieces from the file that will form the UpdatePiece.
00088   int StartPiece;
00089   int EndPiece;
00090   vtkIdType TotalNumberOfPoints;
00091   vtkIdType TotalNumberOfCells;
00092   vtkIdType StartPoint;
00093   
00094   // The PPoints element with point information.
00095   vtkXMLDataElement* PPointsElement;
00096   
00097 private:
00098   vtkXMLPUnstructuredDataReader(const vtkXMLPUnstructuredDataReader&);  // Not implemented.
00099   void operator=(const vtkXMLPUnstructuredDataReader&);  // Not implemented.
00100 };
00101 
00102 #endif