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 #if !defined(VTK_LEGACY_REMOVE)
41 class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeSampleFunction : public vtkHyperOctreeAlgorithm
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
53  int GetLevels();
54 
62  void SetLevels(int levels);
63 
68  int GetMinLevels();
69 
75  void SetMinLevels(int minLevels);
76 
81  double GetThreshold();
82 
88  void SetThreshold(double threshold);
89 
95  int GetDimension();
96 
97  // Set the dimension of the tree with `dim'. See GetDimension() for details.
98  // \pre valid_dim: dim>=1 && dim<=3
99  // \post dimension_is_set: GetDimension()==dim
100  void SetDimension(int dim);
101 
103 
106  vtkSetVector3Macro(Size,double);
108 
110 
113  vtkGetVector3Macro(Size,double);
115 
117 
120  vtkSetVector3Macro(Origin,double);
121  // Return the origin (position of corner (0,0,0) ) of the root.
122  vtkGetVector3Macro(Origin,double);
124 
129  double GetWidth();
130 
136  void SetWidth(double width);
137 
143  double GetHeight();
144 
151  void SetHeight(double height);
152 
158  double GetDepth();
159 
166  void SetDepth(double depth);
167 
169 
172  virtual void SetImplicitFunction(vtkImplicitFunction*);
173  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
175 
177 
180  vtkSetMacro(OutputScalarType,int);
181  vtkGetMacro(OutputScalarType,int);
183  {this->SetOutputScalarType(VTK_DOUBLE);}
185  {this->SetOutputScalarType(VTK_FLOAT);}
187  {this->SetOutputScalarType(VTK_LONG);}
189  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
191  {this->SetOutputScalarType(VTK_INT);}
193  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
195  {this->SetOutputScalarType(VTK_SHORT);}
197  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
199  {this->SetOutputScalarType(VTK_CHAR);}
201  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
203 
207  vtkMTimeType GetMTime() override;
208 
209 protected:
211 
218  ~vtkHyperOctreeSampleFunction() override;
220 
221 
222  int RequestInformation (vtkInformation * vtkNotUsed(request),
223  vtkInformationVector ** vtkNotUsed( inputVector ),
224  vtkInformationVector *outputVector) override;
225 
227 
228  void Subdivide(vtkHyperOctreeCursor *cursor,
229  int level,
230  vtkHyperOctree *output);
231 
233  double Size[3]; // size on each axis
234  double Origin[3]; // position of corner (0,0,0) of the root.
235  int Levels;
237 
240  double Threshold;
241 
242 private:
244  void operator=(const vtkHyperOctreeSampleFunction&) = delete;
245 };
246 #endif // LEGACY remove
247 
248 #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:39
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