VTK
dox/IO/vtkXMLPPolyDataReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkXMLPPolyDataReader.h
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 =========================================================================*/
00028 #ifndef __vtkXMLPPolyDataReader_h
00029 #define __vtkXMLPPolyDataReader_h
00030 
00031 #include "vtkXMLPUnstructuredDataReader.h"
00032 
00033 class vtkPolyData;
00034 
00035 class VTK_IO_EXPORT vtkXMLPPolyDataReader : public vtkXMLPUnstructuredDataReader
00036 {
00037 public:
00038   vtkTypeMacro(vtkXMLPPolyDataReader,vtkXMLPUnstructuredDataReader);
00039   void PrintSelf(ostream& os, vtkIndent indent);  
00040   static vtkXMLPPolyDataReader *New();
00041   
00043 
00044   vtkPolyData *GetOutput();
00045   vtkPolyData *GetOutput(int idx);
00047   
00048 protected:
00049   vtkXMLPPolyDataReader();
00050   ~vtkXMLPPolyDataReader();
00051   
00052   const char* GetDataSetName();
00053   void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
00054   vtkIdType GetNumberOfCellsInPiece(int piece);
00055   vtkIdType GetNumberOfVertsInPiece(int piece);
00056   vtkIdType GetNumberOfLinesInPiece(int piece);
00057   vtkIdType GetNumberOfStripsInPiece(int piece);
00058   vtkIdType GetNumberOfPolysInPiece(int piece);
00059   void SetupOutputTotals();
00060   
00061   void SetupOutputData();
00062   void SetupNextPiece();
00063   int ReadPieceData();
00064   
00065   void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray);
00066   vtkXMLDataReader* CreatePieceReader();
00067   virtual int FillOutputPortInformation(int, vtkInformation*);
00068   
00069   // The size of the UpdatePiece.
00070   vtkIdType TotalNumberOfVerts;
00071   vtkIdType TotalNumberOfLines;
00072   vtkIdType TotalNumberOfStrips;
00073   vtkIdType TotalNumberOfPolys;
00074   vtkIdType StartVert;
00075   vtkIdType StartLine;
00076   vtkIdType StartStrip;
00077   vtkIdType StartPoly;
00078   
00079 private:
00080   vtkXMLPPolyDataReader(const vtkXMLPPolyDataReader&);  // Not implemented.
00081   void operator=(const vtkXMLPPolyDataReader&);  // Not implemented.
00082 };
00083 
00084 #endif