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

# IO/vtkXMLPolyDataReader.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkXMLPolyDataReader.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 =========================================================================*/
    00042 #ifndef __vtkXMLPolyDataReader_h
    00043 #define __vtkXMLPolyDataReader_h
    00044
    00045 #include "vtkXMLUnstructuredDataReader.h"
    00046
    00047 class vtkPolyData;
    00048
    00049 class VTK_IO_EXPORT vtkXMLPolyDataReader : public vtkXMLUnstructuredDataReader
    00050 {
    00051 public:
    00052   vtkTypeRevisionMacro(vtkXMLPolyDataReader,vtkXMLUnstructuredDataReader);
    00053   void PrintSelf(ostream& os, vtkIndent indent);
    00054   static vtkXMLPolyDataReader *New();
    00055
    00057
    00058   void SetOutput(vtkPolyData *output);
    00059   vtkPolyData *GetOutput();
    00060   vtkPolyData *GetOutput(int idx);
    00062
    00064
    00065   virtual vtkIdType GetNumberOfVerts();
    00066   virtual vtkIdType GetNumberOfLines();
    00067   virtual vtkIdType GetNumberOfStrips();
    00068   virtual vtkIdType GetNumberOfPolys();
    00070
    00071 protected:
    00072   vtkXMLPolyDataReader();
    00073   ~vtkXMLPolyDataReader();
    00074
    00075   const char* GetDataSetName();
    00076   void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
    00077   void SetupOutputTotals();
    00078   void SetupNextPiece();
    00079   void SetupPieces(int numPieces);
    00080   void DestroyPieces();
    00081
    00082   void SetupOutputData();
    00083   int ReadPiece(vtkXMLDataElement* ePiece);
    00084   int ReadPieceData();
    00085
    00086   // Read a data array whose tuples coorrespond to cells.
    00087   int ReadArrayForCells(vtkXMLDataElement* da, vtkDataArray* outArray);
    00088
    00089   // The size of the UpdatePiece.
    00090   int TotalNumberOfVerts;
    00091   int TotalNumberOfLines;
    00092   int TotalNumberOfStrips;
    00093   int TotalNumberOfPolys;
    00094   vtkIdType StartVert;
    00095   vtkIdType StartLine;
    00096   vtkIdType StartStrip;
    00097   vtkIdType StartPoly;
    00098
    00099   // The cell elements for each piece.
    00100   vtkXMLDataElement** VertElements;
    00101   vtkXMLDataElement** LineElements;
    00102   vtkXMLDataElement** StripElements;
    00103   vtkXMLDataElement** PolyElements;
    00104   vtkIdType* NumberOfVerts;
    00105   vtkIdType* NumberOfLines;
    00106   vtkIdType* NumberOfStrips;
    00107   vtkIdType* NumberOfPolys;
    00108
    00109 private:
    00110   vtkXMLPolyDataReader(const vtkXMLPolyDataReader&);  // Not implemented.
    00111   void operator=(const vtkXMLPolyDataReader&);  // Not implemented.
    00112 };
    00113
    00114 #endif