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 =========================================================================*/
32 #ifndef vtkHyperOctreeSampleFunction_h
33 #define vtkHyperOctreeSampleFunction_h
34 
35 #include "vtkFiltersHyperTreeModule.h" // For export macro
37 
39 
40 class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeSampleFunction : public vtkHyperOctreeAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
52  int GetLevels();
53 
61  void SetLevels(int levels);
62 
67  int GetMinLevels();
68 
74  void SetMinLevels(int minLevels);
75 
80  double GetThreshold();
81 
87  void SetThreshold(double threshold);
88 
94  int GetDimension();
95 
96  // Set the dimension of the tree with `dim'. See GetDimension() for details.
97  // \pre valid_dim: dim>=1 && dim<=3
98  // \post dimension_is_set: GetDimension()==dim
99  void SetDimension(int dim);
100 
102 
105  vtkSetVector3Macro(Size,double);
107 
109 
112  vtkGetVector3Macro(Size,double);
114 
116 
119  vtkSetVector3Macro(Origin,double);
120  // Return the origin (position of corner (0,0,0) ) of the root.
121  vtkGetVector3Macro(Origin,double);
123 
128  double GetWidth();
129 
135  void SetWidth(double width);
136 
142  double GetHeight();
143 
150  void SetHeight(double height);
151 
157  double GetDepth();
158 
165  void SetDepth(double depth);
166 
168 
172  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
174 
176 
179  vtkSetMacro(OutputScalarType,int);
180  vtkGetMacro(OutputScalarType,int);
182  {this->SetOutputScalarType(VTK_DOUBLE);}
184  {this->SetOutputScalarType(VTK_FLOAT);}
186  {this->SetOutputScalarType(VTK_LONG);}
188  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
190  {this->SetOutputScalarType(VTK_INT);}
192  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
194  {this->SetOutputScalarType(VTK_SHORT);}
196  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
198  {this->SetOutputScalarType(VTK_CHAR);}
200  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
202 
207 
208 protected:
210 
219 
220 
221  int RequestInformation (vtkInformation * vtkNotUsed(request),
222  vtkInformationVector ** vtkNotUsed( inputVector ),
223  vtkInformationVector *outputVector);
224 
226 
228  int level,
229  vtkHyperOctree *output);
230 
232  double Size[3]; // size on each axis
233  double Origin[3]; // position of corner (0,0,0) of the root.
234  int Levels;
236 
239  double Threshold;
240 
241 private:
243  void operator=(const vtkHyperOctreeSampleFunction&) VTK_DELETE_FUNCTION;
244 };
245 
246 #endif
Superclass for algorithms that produce only octree as output.
Objects that can traverse hyperoctree nodes.
sample an implicit function over an hyperoctree
static vtkHyperOctreeSampleFunction * New()
vtkHyperOctreeSampleFunction()
Default constructor.
virtual void SetImplicitFunction(vtkImplicitFunction *)
Specify the implicit function to use to generate data.
void SetDepth(double depth)
Return the length along the z-axis.
void SetHeight(double height)
Set the length along the y-axis.
int GetLevels()
Return the maximum number of levels of the hyperoctree.
void SetLevels(int levels)
Set the maximum number of levels of the hyperoctree.
vtkMTimeType GetMTime()
Return the MTime also considering the implicit function.
void SetMinLevels(int minLevels)
Set the minimal number of levels of systematic subdivision.
double GetDepth()
Return the length along the z-axis.
int RequestInformation(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector)
void Subdivide(vtkHyperOctreeCursor *cursor, int level, vtkHyperOctree *output)
void SetWidth(double width)
Set the length along the x-axis.
double GetWidth()
Return the length along the x-axis.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SetThreshold(double threshold)
Set the threshold over which a subdivision is required.
double GetHeight()
Return the length along the y-axis.
int GetDimension()
Return the dimension of the tree (1D:binary tree(2 children), 2D:quadtree(4 children),...
int GetMinLevels()
Return the minimal number of levels of systematic subdivision.
double GetThreshold()
Return the threshold over which a subdivision is required.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
A dataset structured as a tree where each node has exactly 2^n children.
abstract interface for implicit functions
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ level
Definition: vtkX3D.h:395
@ height
Definition: vtkX3D.h:254
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_SHORT
Definition: vtkType.h:52
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
#define VTK_DOUBLE
Definition: vtkType.h:59
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
#define VTK_INT
Definition: vtkType.h:54
#define VTK_FLOAT
Definition: vtkType.h:58
#define VTK_CHAR
Definition: vtkType.h:49
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
#define VTK_LONG
Definition: vtkType.h:56