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 
171  virtual void SetImplicitFunction(vtkImplicitFunction*);
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 
227  void Subdivide(vtkHyperOctreeCursor *cursor,
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
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.
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.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
#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'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