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);
47  static vtkXMLHyperOctreeWriter* New();
48 
53 
57  const char* GetDefaultFileExtension();
58 
59 protected:
62 
63  const char* GetDataSetName();
64 
65  // specify that we require HyperOctree input
67 
68  // The most important method, make the XML file for my input.
69  int WriteData();
70 
71  // <HyperOctree ...
72  int StartPrimElement(vtkIndent);
73 
74  // ... dim, size, origin>
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
91  unsigned long TopoOffset;
95 
96 private:
97  vtkXMLHyperOctreeWriter(const vtkXMLHyperOctreeWriter&) VTK_DELETE_FUNCTION;
98  void operator=(const vtkXMLHyperOctreeWriter&) VTK_DELETE_FUNCTION;
99 };
100 
101 #endif
virtual const char * GetDataSetName()=0
vtkDataObject * GetInput()
Assign a data object as input.
Definition: vtkXMLWriter.h:213
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.
virtual int WriteData()
Definition: vtkXMLWriter.h:335
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)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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()