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 =========================================================================*/
29 #ifndef vtkHyperOctreeSampleFunction_h
30 #define vtkHyperOctreeSampleFunction_h
31 
32 #include "vtkFiltersHyperTreeModule.h" // For export macro
34 
36 
37 class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeSampleFunction : public vtkHyperOctreeAlgorithm
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
44 
49  int GetLevels();
50 
58  void SetLevels(int levels);
59 
64  int GetMinLevels();
65 
71  void SetMinLevels(int minLevels);
72 
77  double GetThreshold();
78 
84  void SetThreshold(double threshold);
85 
91  int GetDimension();
92 
93  // Set the dimension of the tree with `dim'. See GetDimension() for details.
94  // \pre valid_dim: dim>=1 && dim<=3
95  // \post dimension_is_set: GetDimension()==dim
96  void SetDimension(int dim);
97 
99 
102  vtkSetVector3Macro(Size,double);
104 
106 
109  vtkGetVector3Macro(Size,double);
111 
113 
116  vtkSetVector3Macro(Origin,double);
117  // Return the origin (position of corner (0,0,0) ) of the root.
118  vtkGetVector3Macro(Origin,double);
120 
125  double GetWidth();
126 
132  void SetWidth(double width);
133 
139  double GetHeight();
140 
147  void SetHeight(double height);
148 
154  double GetDepth();
155 
162  void SetDepth(double depth);
163 
165 
168  virtual void SetImplicitFunction(vtkImplicitFunction*);
169  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
171 
173 
176  vtkSetMacro(OutputScalarType,int);
177  vtkGetMacro(OutputScalarType,int);
179  {this->SetOutputScalarType(VTK_DOUBLE);}
181  {this->SetOutputScalarType(VTK_FLOAT);}
183  {this->SetOutputScalarType(VTK_LONG);}
185  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
187  {this->SetOutputScalarType(VTK_INT);}
189  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
191  {this->SetOutputScalarType(VTK_SHORT);}
193  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
195  {this->SetOutputScalarType(VTK_CHAR);}
197  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
199 
203  vtkMTimeType GetMTime() VTK_OVERRIDE;
204 
205 protected:
207 
214  ~vtkHyperOctreeSampleFunction() VTK_OVERRIDE;
216 
217 
218  int RequestInformation (vtkInformation * vtkNotUsed(request),
219  vtkInformationVector ** vtkNotUsed( inputVector ),
220  vtkInformationVector *outputVector) VTK_OVERRIDE;
221 
223 
224  void Subdivide(vtkHyperOctreeCursor *cursor,
225  int level,
226  vtkHyperOctree *output);
227 
229  double Size[3]; // size on each axis
230  double Origin[3]; // position of corner (0,0,0) of the root.
231  int Levels;
233 
236  double Threshold;
237 
238 private:
240  void operator=(const vtkHyperOctreeSampleFunction&) VTK_DELETE_FUNCTION;
241 };
242 
243 #endif
abstract interface for implicit functions
void SetOutputScalarTypeToLong()
Set what type of scalar data this source should generate.
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
Superclass for algorithms that produce only octree as output.
void SetOutputScalarTypeToUnsignedInt()
Set what type of scalar data this source should generate.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
A dataset structured as a tree where each node has exactly 2^n children.
#define VTK_DOUBLE
Definition: vtkType.h:59
#define VTK_FLOAT
Definition: vtkType.h:58
void SetOutputScalarTypeToUnsignedLong()
Set what type of scalar data this source should generate.
a simple class to control print indentation
Definition: vtkIndent.h:33
sample an implicit function over an hyperoctree
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkMTimeType GetMTime()
Return this object&#39;s modified time.
#define VTK_SHORT
Definition: vtkType.h:52
#define VTK_CHAR
Definition: vtkType.h:49
#define VTK_LONG
Definition: vtkType.h:56
void SetOutputScalarTypeToUnsignedShort()
Set what type of scalar data this source should generate.
void SetOutputScalarTypeToShort()
Set what type of scalar data this source should generate.
void SetOutputScalarTypeToFloat()
Set what type of scalar data this source should generate.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Objects that can traverse hyperoctree nodes.
void SetOutputScalarTypeToInt()
Set what type of scalar data this source should generate.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void SetOutputScalarTypeToDouble()
Set what type of scalar data this source should generate.
void SetOutputScalarTypeToUnsignedChar()
Set what type of scalar data this source should generate.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
void SetOutputScalarTypeToChar()
Set what type of scalar data this source should generate.
#define VTK_INT
Definition: vtkType.h:54