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
vtkHyperOctreeAlgorithm.h
vtkHyperOctreeSampleFunction
sample an implicit function over an hyperoctree
Definition: vtkHyperOctreeSampleFunction.h:40
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToUnsignedShort
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkHyperOctreeSampleFunction.h:195
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToShort
void SetOutputScalarTypeToShort()
Definition: vtkHyperOctreeSampleFunction.h:193
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkHyperOctreeSampleFunction.h:181
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkHyperOctreeSampleFunction.h:183
vtkHyperOctreeSampleFunction::Threshold
double Threshold
Definition: vtkHyperOctreeSampleFunction.h:239
vtkHyperOctreeCursor
Objects that can traverse hyperoctree nodes.
Definition: vtkHyperOctreeCursor.h:51
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToInt
void SetOutputScalarTypeToInt()
Definition: vtkHyperOctreeSampleFunction.h:189
vtkHyperOctreeSampleFunction::Levels
int Levels
Definition: vtkHyperOctreeSampleFunction.h:234
vtkHyperOctreeSampleFunction::Dimension
int Dimension
Definition: vtkHyperOctreeSampleFunction.h:231
vtkHyperOctreeAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToUnsignedChar
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkHyperOctreeSampleFunction.h:199
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:58
vtkHyperOctreeAlgorithm
Superclass for algorithms that produce only octree as output.
Definition: vtkHyperOctreeAlgorithm.h:41
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToChar
void SetOutputScalarTypeToChar()
Definition: vtkHyperOctreeSampleFunction.h:197
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkX3D::height
@ height
Definition: vtkX3D.h:254
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:49
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToLong
void SetOutputScalarTypeToLong()
Definition: vtkHyperOctreeSampleFunction.h:185
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:58
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToUnsignedInt
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkHyperOctreeSampleFunction.h:191
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:59
vtkHyperOctreeAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkHyperOctreeAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:56
vtkHyperOctreeSampleFunction::MinLevels
int MinLevels
Definition: vtkHyperOctreeSampleFunction.h:235
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkAlgorithm::New
static vtkAlgorithm * New()
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:52
vtkHyperOctreeSampleFunction::ImplicitFunction
vtkImplicitFunction * ImplicitFunction
Definition: vtkHyperOctreeSampleFunction.h:238
vtkHyperOctreeSampleFunction::OutputScalarType
int OutputScalarType
Definition: vtkHyperOctreeSampleFunction.h:237
vtkHyperOctree
A dataset structured as a tree where each node has exactly 2^n children.
Definition: vtkHyperOctree.h:143
VTK_INT
#define VTK_INT
Definition: vtkType.h:54
vtkHyperOctreeSampleFunction::SetOutputScalarTypeToUnsignedLong
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkHyperOctreeSampleFunction.h:187