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 class vtkHyperOctree;
40 class vtkIntArray;
41 
42 class VTKIOXML_EXPORT vtkXMLHyperOctreeWriter : public vtkXMLWriter
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47  static vtkXMLHyperOctreeWriter* New();
48 
53 
57  const char* GetDefaultFileExtension() VTK_OVERRIDE;
58 
59 protected:
61  ~vtkXMLHyperOctreeWriter() VTK_OVERRIDE;
62 
63  const char* GetDataSetName() VTK_OVERRIDE;
64 
65  // specify that we require HyperOctree input
66  int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
67 
68  // The most important method, make the XML file for my input.
69  int WriteData() VTK_OVERRIDE;
70 
71  // <HyperOctree ...
72  int StartPrimElement(vtkIndent);
73 
74  // ... dim, size, origin>
75  void WritePrimaryElementAttributes(ostream &, vtkIndent) VTK_OVERRIDE;
76 
77  // Tree Structure
78  int WriteTopology(vtkIndent);
79 
80  // Used by WriteTopology to make and array from the Tree structure recursively
81  void SerializeTopology(vtkHyperOctreeCursor *, int);
82 
83  // Writes PointData and CellData attribute data.
84  int WriteAttributeData(vtkIndent);
85 
86  // </HyperOctree>
87  int FinishPrimElement(vtkIndent);
88 
89  // For appended mode placekeeping
90  vtkIntArray *TopologyArray;
91  unsigned long TopoOffset;
92  OffsetsManagerGroup * TopologyOM;
93  OffsetsManagerGroup * PointDataOM;
94  OffsetsManagerGroup * CellDataOM;
95 
96 private:
97  vtkXMLHyperOctreeWriter(const vtkXMLHyperOctreeWriter&) VTK_DELETE_FUNCTION;
98  void operator=(const vtkXMLHyperOctreeWriter&) VTK_DELETE_FUNCTION;
99 };
100 
101 #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:45
Superclass for VTK&#39;s XML file writers.
Definition: vtkXMLWriter.h:53
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.
Objects that can traverse hyperoctree nodes.
static vtkAlgorithm * New()