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

vtkXMLPolyDataWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXMLPolyDataWriter.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 =========================================================================*/
00043 #ifndef __vtkXMLPolyDataWriter_h
00044 #define __vtkXMLPolyDataWriter_h
00045 
00046 #include "vtkXMLUnstructuredDataWriter.h"
00047 
00048 class vtkPolyData;
00049 
00050 class VTK_IO_EXPORT vtkXMLPolyDataWriter : public vtkXMLUnstructuredDataWriter
00051 {
00052 public:
00053   vtkTypeRevisionMacro(vtkXMLPolyDataWriter,vtkXMLUnstructuredDataWriter);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055   static vtkXMLPolyDataWriter* New();
00056   
00058 
00059   void SetInput(vtkPolyData* input);
00060   vtkPolyData* GetInput();
00062   
00064   const char* GetDefaultFileExtension();
00065   
00066 protected:
00067   vtkXMLPolyDataWriter();
00068   ~vtkXMLPolyDataWriter();  
00069 
00070   const char* GetDataSetName();
00071   void SetInputUpdateExtent(int piece, int numPieces, int ghostLevel);
00072   
00073   void WriteInlinePieceAttributes();
00074   void WriteInlinePiece(vtkIndent indent);
00075   
00076   int WriteAppendedMode(vtkIndent indent);
00077   void WriteAppendedPieceAttributes(int index);
00078   void WriteAppendedPiece(int index, vtkIndent indent);
00079   void WriteAppendedPieceData(int index);
00080 
00081   virtual vtkIdType GetNumberOfInputCells();
00082   void CalculateSuperclassFraction(float* fractions);
00083 
00084   // Positions of attributes for each piece.
00085   unsigned long* NumberOfVertsPositions;
00086   unsigned long* NumberOfLinesPositions;
00087   unsigned long* NumberOfStripsPositions;
00088   unsigned long* NumberOfPolysPositions;
00089   unsigned long** VertsPositions;
00090   unsigned long** LinesPositions;
00091   unsigned long** StripsPositions;
00092   unsigned long** PolysPositions;
00093 private:
00094   vtkXMLPolyDataWriter(const vtkXMLPolyDataWriter&);  // Not implemented.
00095   void operator=(const vtkXMLPolyDataWriter&);  // Not implemented.
00096 };
00097 
00098 #endif