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 =========================================================================*/
32 #ifndef vtkXMLHyperOctreeWriter_h
33 #define vtkXMLHyperOctreeWriter_h
34 
35 #include "vtkIOXMLModule.h" // For export macro
36 #include "vtkXMLWriter.h"
37 
38 #if !defined(VTK_LEGACY_REMOVE)
39 class vtkHyperOctree;
41 class vtkIntArray;
42 
43 class VTKIOXML_EXPORT vtkXMLHyperOctreeWriter : public vtkXMLWriter
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48  static vtkXMLHyperOctreeWriter* New();
49 
54 
58  const char* GetDefaultFileExtension() override;
59 
60 protected:
62  ~vtkXMLHyperOctreeWriter() override;
63 
64  const char* GetDataSetName() override;
65 
66  // specify that we require HyperOctree input
68 
69  // The most important method, make the XML file for my input.
70  int WriteData() override;
71 
72  // <HyperOctree ...
73  int StartPrimElement(vtkIndent);
74 
75  // ... dim, size, origin>
76  void WritePrimaryElementAttributes(ostream &, vtkIndent) override;
77 
78  // Tree Structure
79  int WriteTopology(vtkIndent);
80 
81  // Used by WriteTopology to make and array from the Tree structure recursively
82  void SerializeTopology(vtkHyperOctreeCursor *, int);
83 
84  // Writes PointData and CellData attribute data.
85  int WriteAttributeData(vtkIndent);
86 
87  // </HyperOctree>
88  int FinishPrimElement(vtkIndent);
89 
90  // For appended mode placekeeping
92  unsigned long TopoOffset;
96 
97 private:
99  void operator=(const vtkXMLHyperOctreeWriter&) = delete;
100 };
101 #endif // LEGACY remove
102 
103 #endif
virtual const char * GetDataSetName()=0
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:218
Store vtkAlgorithm input/output information.
Write VTK XML HyperOctree files.
OffsetsManagerGroup * TopologyOM
OffsetsManagerGroup * CellDataOM
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.
virtual int WriteData()
Definition: vtkXMLWriter.h:340
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
OffsetsManagerGroup * PointDataOM
Superclass for VTK's XML file writers.
Definition: vtkXMLWriter.h:53
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void WritePrimaryElementAttributes(ostream &os, vtkIndent indent)
virtual const char * GetDefaultFileExtension()=0
Get the default file extension for files written by this writer.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Objects that can traverse hyperoctree nodes.
static vtkAlgorithm * New()