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) override;
49  static vtkXMLPolyDataWriter* New();
50 
55 
59  const char* GetDefaultFileExtension() override;
60 
61 protected:
63  ~vtkXMLPolyDataWriter() override;
64 
65  // see algorithm for more info
67 
68  const char* GetDataSetName() override;
69 
70  void AllocatePositionArrays() override;
71  void DeletePositionArrays() override;
72 
73  void WriteInlinePieceAttributes() override;
74  void WriteInlinePiece(vtkIndent indent) override;
75 
76  void WriteAppendedPieceAttributes(int index) override;
77  void WriteAppendedPiece(int index, vtkIndent indent) override;
78  void WriteAppendedPieceData(int index) override;
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:
96  void operator=(const vtkXMLPolyDataWriter&) = delete;
97 };
98 
99 #endif
virtual void WriteInlinePieceAttributes()
virtual vtkIdType GetNumberOfInputCells()=0
OffsetsManagerArray * LinesOM
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:235
Store vtkAlgorithm input/output information.
unsigned long * NumberOfVertsPositions
Superclass for VTK XML unstructured data writers.
OffsetsManagerArray * PolysOM
int vtkIdType
Definition: vtkType.h:347
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()
const char * GetDataSetName() override=0
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.
void PrintSelf(ostream &os, vtkIndent indent) override
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