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) VTK_OVERRIDE;
49  static vtkXMLPolyDataWriter* New();
50 
55 
59  const char* GetDefaultFileExtension() VTK_OVERRIDE;
60 
61 protected:
63  ~vtkXMLPolyDataWriter() VTK_OVERRIDE;
64 
65  // see algorithm for more info
66  int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
67 
68  const char* GetDataSetName() VTK_OVERRIDE;
69 
70  void AllocatePositionArrays() VTK_OVERRIDE;
71  void DeletePositionArrays() VTK_OVERRIDE;
72 
73  void WriteInlinePieceAttributes() VTK_OVERRIDE;
74  void WriteInlinePiece(vtkIndent indent) VTK_OVERRIDE;
75 
76  void WriteAppendedPieceAttributes(int index) VTK_OVERRIDE;
77  void WriteAppendedPiece(int index, vtkIndent indent) VTK_OVERRIDE;
78  void WriteAppendedPieceData(int index) VTK_OVERRIDE;
79 
80  vtkIdType GetNumberOfInputCells() VTK_OVERRIDE;
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
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:218
Store vtkAlgorithm input/output information.
Superclass for VTK XML unstructured data writers.
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkAlgorithm * New()
Write VTK XML PolyData files.