VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
31 #ifndef __vtkHyperOctreeSampleFunction_h
32 #define __vtkHyperOctreeSampleFunction_h
33 
34 #include "vtkFiltersHyperTreeModule.h" // For export macro
36 
37 class vtkImplicitFunction;
38 
39 class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeSampleFunction : public vtkHyperOctreeAlgorithm
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
49  int GetLevels();
50 
55  void SetLevels(int levels);
56 
59  int GetMinLevels();
60 
64  void SetMinLevels(int minLevels);
65 
68  double GetThreshold();
69 
73  void SetThreshold(double threshold);
74 
78  int GetDimension();
79 
80  // Set the dimension of the tree with `dim'. See GetDimension() for details.
81  // \pre valid_dim: dim>=1 && dim<=3
82  // \post dimension_is_set: GetDimension()==dim
83  void SetDimension(int dim);
84 
86 
87  vtkSetVector3Macro(Size,double);
89 
91 
92  vtkGetVector3Macro(Size,double);
94 
96 
97  vtkSetVector3Macro(Origin,double);
98  // Return the origin (position of corner (0,0,0) ) of the root.
99  vtkGetVector3Macro(Origin,double);
101 
103  double GetWidth();
104 
107  void SetWidth(double width);
108 
111  double GetHeight();
112 
116  void SetHeight(double height);
117 
120  double GetDepth();
121 
125  void SetDepth(double depth);
126 
128 
129  virtual void SetImplicitFunction(vtkImplicitFunction*);
130  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
132 
134 
135  vtkSetMacro(OutputScalarType,int);
136  vtkGetMacro(OutputScalarType,int);
138  {this->SetOutputScalarType(VTK_DOUBLE);}
140  {this->SetOutputScalarType(VTK_FLOAT);}
142  {this->SetOutputScalarType(VTK_LONG);}
144  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
146  {this->SetOutputScalarType(VTK_INT);}
148  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
150  {this->SetOutputScalarType(VTK_SHORT);}
152  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
154  {this->SetOutputScalarType(VTK_CHAR);}
156  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
158 
160  unsigned long GetMTime();
161 
162 protected:
164 
170 
171 
172  int RequestInformation (vtkInformation * vtkNotUsed(request),
173  vtkInformationVector ** vtkNotUsed( inputVector ),
174  vtkInformationVector *outputVector);
175 
176  virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
177 
178  void Subdivide(vtkHyperOctreeCursor *cursor,
179  int level,
180  vtkHyperOctree *output);
181 
183  double Size[3]; // size on each axis
184  double Origin[3]; // position of corner (0,0,0) of the root.
185  int Levels;
187 
189  vtkImplicitFunction *ImplicitFunction;
190  double Threshold;
191 
192 private:
194  void operator=(const vtkHyperOctreeSampleFunction&); // Not implemented.
195 };
196 
197 #endif
Superclass for algorithms that produce only octree as output.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
sample an implicit function over an hyperoctree
Objects that can traverse hyperoctree nodes.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()