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

IO/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 =========================================================================*/
00029 #ifndef __vtkXMLPolyDataWriter_h
00030 #define __vtkXMLPolyDataWriter_h
00031 
00032 #include "vtkXMLUnstructuredDataWriter.h"
00033 
00034 class vtkPolyData;
00035 
00036 class VTK_IO_EXPORT vtkXMLPolyDataWriter : public vtkXMLUnstructuredDataWriter
00037 {
00038 public:
00039   vtkTypeRevisionMacro(vtkXMLPolyDataWriter,vtkXMLUnstructuredDataWriter);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041   static vtkXMLPolyDataWriter* New();
00042   
00044 
00045   void SetInput(vtkPolyData* input);
00046   vtkPolyData* GetInput();
00048   
00050   const char* GetDefaultFileExtension();
00051   
00052 protected:
00053   vtkXMLPolyDataWriter();
00054   ~vtkXMLPolyDataWriter();  
00055 
00056   const char* GetDataSetName();
00057   void SetInputUpdateExtent(int piece, int numPieces, int ghostLevel);
00058   
00059   void WriteInlinePieceAttributes();
00060   void WriteInlinePiece(vtkIndent indent);
00061   
00062   int WriteAppendedMode(vtkIndent indent);
00063   void WriteAppendedPieceAttributes(int index);
00064   void WriteAppendedPiece(int index, vtkIndent indent);
00065   void WriteAppendedPieceData(int index);
00066 
00067   virtual vtkIdType GetNumberOfInputCells();
00068   void CalculateSuperclassFraction(float* fractions);
00069 
00070   // Positions of attributes for each piece.
00071   unsigned long* NumberOfVertsPositions;
00072   unsigned long* NumberOfLinesPositions;
00073   unsigned long* NumberOfStripsPositions;
00074   unsigned long* NumberOfPolysPositions;
00075   unsigned long** VertsPositions;
00076   unsigned long** LinesPositions;
00077   unsigned long** StripsPositions;
00078   unsigned long** PolysPositions;
00079 private:
00080   vtkXMLPolyDataWriter(const vtkXMLPolyDataWriter&);  // Not implemented.
00081   void operator=(const vtkXMLPolyDataWriter&);  // Not implemented.
00082 };
00083 
00084 #endif