VTK
vtkXMLPolyDataWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPolyDataWriter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
36 #ifndef vtkXMLPolyDataWriter_h
37 #define vtkXMLPolyDataWriter_h
38 
39 #include "vtkIOXMLModule.h" // For export macro
41 
42 class vtkPolyData;
43 
44 class VTKIOXML_EXPORT vtkXMLPolyDataWriter : public vtkXMLUnstructuredDataWriter
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent);
49  static vtkXMLPolyDataWriter* New();
50 
55 
59  const char* GetDefaultFileExtension();
60 
61 protected:
64 
65  // see algorithm for more info
67 
68  const char* GetDataSetName();
69 
70  virtual void AllocatePositionArrays();
71  virtual void DeletePositionArrays();
72 
74  void WriteInlinePiece(vtkIndent indent);
75 
77  void WriteAppendedPiece(int index, vtkIndent indent);
78  void WriteAppendedPieceData(int index);
79 
81  void CalculateSuperclassFraction(float* fractions);
82 
83  // Positions of attributes for each piece.
84  unsigned long* NumberOfVertsPositions;
85  unsigned long* NumberOfLinesPositions;
86  unsigned long* NumberOfStripsPositions;
87  unsigned long* NumberOfPolysPositions;
88 
93 
94 private:
95  vtkXMLPolyDataWriter(const vtkXMLPolyDataWriter&) VTK_DELETE_FUNCTION;
96  void operator=(const vtkXMLPolyDataWriter&) VTK_DELETE_FUNCTION;
97 };
98 
99 #endif
virtual void WriteInlinePieceAttributes()
virtual vtkIdType GetNumberOfInputCells()=0
OffsetsManagerArray * LinesOM
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:213
Store vtkAlgorithm input/output information.
unsigned long * NumberOfVertsPositions
Superclass for VTK XML unstructured data writers.
OffsetsManagerArray * PolysOM
int vtkIdType
Definition: vtkType.h:287
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
virtual void WriteAppendedPieceData(int index)
virtual void WriteAppendedPiece(int index, vtkIndent indent)
virtual void DeletePositionArrays()
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void AllocatePositionArrays()
OffsetsManagerArray * VertsOM
unsigned long * NumberOfPolysPositions
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
virtual void WriteAppendedPieceAttributes(int index)
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual const char * GetDataSetName()=0
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
unsigned long * NumberOfLinesPositions
static vtkAlgorithm * New()
OffsetsManagerArray * StripsOM
Write VTK XML PolyData files.
virtual void WriteInlinePiece(vtkIndent indent)
unsigned long * NumberOfStripsPositions