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

IO/vtkXMLPPolyDataReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLPPolyDataReader.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 =========================================================================*/
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   vtkTypeRevisionMacro(vtkXMLPPolyDataReader,vtkXMLPUnstructuredDataReader);
00039   void PrintSelf(ostream& os, vtkIndent indent);  
00040   static vtkXMLPPolyDataReader *New();
00041   
00043 
00044   void SetOutput(vtkPolyData *output);
00045   vtkPolyData *GetOutput();
00046   vtkPolyData *GetOutput(int idx);
00048   
00049 protected:
00050   vtkXMLPPolyDataReader();
00051   ~vtkXMLPPolyDataReader();
00052   
00053   const char* GetDataSetName();
00054   void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
00055   vtkIdType GetNumberOfCellsInPiece(int piece);
00056   vtkIdType GetNumberOfVertsInPiece(int piece);
00057   vtkIdType GetNumberOfLinesInPiece(int piece);
00058   vtkIdType GetNumberOfStripsInPiece(int piece);
00059   vtkIdType GetNumberOfPolysInPiece(int piece);
00060   void SetupOutputTotals();
00061   
00062   void SetupOutputData();
00063   void SetupNextPiece();
00064   int ReadPieceData();
00065   
00066   void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray);
00067   vtkXMLDataReader* CreatePieceReader();
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