VTK
vtkXMLHyperOctreeWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLHyperOctreeWriter.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 =========================================================================*/
29 #ifndef vtkXMLHyperOctreeWriter_h
30 #define vtkXMLHyperOctreeWriter_h
31 
32 #include "vtkIOXMLModule.h" // For export macro
33 #include "vtkXMLWriter.h"
34 
35 class vtkHyperOctree;
37 class vtkIntArray;
38 
39 class VTKIOXML_EXPORT vtkXMLHyperOctreeWriter : public vtkXMLWriter
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44  static vtkXMLHyperOctreeWriter* New();
45 
50 
54  const char* GetDefaultFileExtension() VTK_OVERRIDE;
55 
56 protected:
58  ~vtkXMLHyperOctreeWriter() VTK_OVERRIDE;
59 
60  const char* GetDataSetName() VTK_OVERRIDE;
61 
62  // specify that we require HyperOctree input
63  int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
64 
65  // The most important method, make the XML file for my input.
66  int WriteData() VTK_OVERRIDE;
67 
68  // <HyperOctree ...
69  int StartPrimElement(vtkIndent);
70 
71  // ... dim, size, origin>
72  void WritePrimaryElementAttributes(ostream &, vtkIndent) VTK_OVERRIDE;
73 
74  // Tree Structure
75  int WriteTopology(vtkIndent);
76 
77  // Used by WriteTopology to make and array from the Tree structure recursively
78  void SerializeTopology(vtkHyperOctreeCursor *, int);
79 
80  // Writes PointData and CellData attribute data.
81  int WriteAttributeData(vtkIndent);
82 
83  // </HyperOctree>
84  int FinishPrimElement(vtkIndent);
85 
86  // For appended mode placekeeping
87  vtkIntArray *TopologyArray;
88  unsigned long TopoOffset;
89  OffsetsManagerGroup * TopologyOM;
90  OffsetsManagerGroup * PointDataOM;
91  OffsetsManagerGroup * CellDataOM;
92 
93 private:
94  vtkXMLHyperOctreeWriter(const vtkXMLHyperOctreeWriter&) VTK_DELETE_FUNCTION;
95  void operator=(const vtkXMLHyperOctreeWriter&) VTK_DELETE_FUNCTION;
96 };
97 
98 #endif
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:218
Store vtkAlgorithm input/output information.
Write VTK XML HyperOctree files.
A dataset structured as a tree where each node has exactly 2^n children.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:39
Superclass for VTK&#39;s XML file writers.
Definition: vtkXMLWriter.h:53
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
Objects that can traverse hyperoctree nodes.
static vtkAlgorithm * New()