VTK
vtkHyperOctreeSampleFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHyperOctreeSampleFunction.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 =========================================================================*/
31 #ifndef vtkHyperOctreeSampleFunction_h
32 #define vtkHyperOctreeSampleFunction_h
33 
34 #include "vtkFiltersHyperTreeModule.h" // For export macro
36 
38 
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
49  int GetLevels();
50 
55  void SetLevels(int levels);
56 
59  int GetMinLevels();
60 
64  void SetMinLevels(int minLevels);
65 
68  double GetThreshold();
69 
73  void SetThreshold(double threshold);
74 
78  int GetDimension();
79 
80  // Set the dimension of the tree with `dim'. See GetDimension() for details.
81  // \pre valid_dim: dim>=1 && dim<=3
82  // \post dimension_is_set: GetDimension()==dim
83  void SetDimension(int dim);
84 
86 
87  vtkSetVector3Macro(Size,double);
89 
91 
92  vtkGetVector3Macro(Size,double);
94 
96 
97  vtkSetVector3Macro(Origin,double);
98  // Return the origin (position of corner (0,0,0) ) of the root.
99  vtkGetVector3Macro(Origin,double);
101 
103  double GetWidth();
104 
107  void SetWidth(double width);
108 
111  double GetHeight();
112 
116  void SetHeight(double height);
117 
120  double GetDepth();
121 
125  void SetDepth(double depth);
126 
128 
129  virtual void SetImplicitFunction(vtkImplicitFunction*);
130  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
132 
134 
135  vtkSetMacro(OutputScalarType,int);
136  vtkGetMacro(OutputScalarType,int);
138  {this->SetOutputScalarType(VTK_DOUBLE);}
140  {this->SetOutputScalarType(VTK_FLOAT);}
142  {this->SetOutputScalarType(VTK_LONG);}
144  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
146  {this->SetOutputScalarType(VTK_INT);}
148  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
150  {this->SetOutputScalarType(VTK_SHORT);}
152  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
154  {this->SetOutputScalarType(VTK_CHAR);}
156  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
158 
160  unsigned long GetMTime();
161 
162 protected:
164 
170 
171 
172  int RequestInformation (vtkInformation * vtkNotUsed(request),
173  vtkInformationVector ** vtkNotUsed( inputVector ),
174  vtkInformationVector *outputVector);
175 
177 
178  void Subdivide(vtkHyperOctreeCursor *cursor,
179  int level,
180  vtkHyperOctree *output);
181 
183  double Size[3]; // size on each axis
184  double Origin[3]; // position of corner (0,0,0) of the root.
185  int Levels;
187 
190  double Threshold;
191 
192 private:
194  void operator=(const vtkHyperOctreeSampleFunction&); // Not implemented.
195 };
196 
197 #endif
abstract interface for implicit functions
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
Superclass for algorithms that produce only octree as output.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
A dataset structured as a tree where each node has exactly 2^n children.
#define VTKFILTERSHYPERTREE_EXPORT
#define VTK_DOUBLE
Definition: vtkType.h:36
#define VTK_FLOAT
Definition: vtkType.h:35
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
sample an implicit function over an hyperoctree
#define VTK_SHORT
Definition: vtkType.h:29
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
Objects that can traverse hyperoctree nodes.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
#define VTK_INT
Definition: vtkType.h:31