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 =========================================================================*/
31 #ifndef __vtkHyperOctreeSampleFunction_h
32 #define __vtkHyperOctreeSampleFunction_h
33 
35 
37 
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
48  int GetLevels();
49 
54  void SetLevels(int levels);
55 
58  int GetMinLevels();
59 
63  void SetMinLevels(int minLevels);
64 
67  double GetThreshold();
68 
72  void SetThreshold(double threshold);
73 
77  int GetDimension();
78 
79  // Set the dimension of the tree with `dim'. See GetDimension() for details.
80  // \pre valid_dim: dim>=1 && dim<=3
81  // \post dimension_is_set: GetDimension()==dim
82  void SetDimension(int dim);
83 
85 
86  vtkSetVector3Macro(Size,double);
88 
90 
91  vtkGetVector3Macro(Size,double);
93 
95 
96  vtkSetVector3Macro(Origin,double);
97  // Return the origin (position of corner (0,0,0) ) of the root.
98  vtkGetVector3Macro(Origin,double);
100 
102  double GetWidth();
103 
106  void SetWidth(double width);
107 
110  double GetHeight();
111 
115  void SetHeight(double height);
116 
119  double GetDepth();
120 
124  void SetDepth(double depth);
125 
127 
128  virtual void SetImplicitFunction(vtkImplicitFunction*);
129  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
131 
133 
134  vtkSetMacro(OutputScalarType,int);
135  vtkGetMacro(OutputScalarType,int);
137  {this->SetOutputScalarType(VTK_DOUBLE);}
139  {this->SetOutputScalarType(VTK_FLOAT);}
141  {this->SetOutputScalarType(VTK_LONG);}
143  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
145  {this->SetOutputScalarType(VTK_INT);}
147  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
149  {this->SetOutputScalarType(VTK_SHORT);}
151  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
153  {this->SetOutputScalarType(VTK_CHAR);}
155  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
157 
159  unsigned long GetMTime();
160 
161 protected:
163 
169 
170 
171  int RequestInformation (vtkInformation * vtkNotUsed(request),
172  vtkInformationVector ** vtkNotUsed( inputVector ),
173  vtkInformationVector *outputVector);
174 
176 
177  void Subdivide(vtkHyperOctreeCursor *cursor,
178  int level,
179  vtkHyperOctree *output);
180 
182  double Size[3]; // size on each axis
183  double Origin[3]; // position of corner (0,0,0) of the root.
184  int Levels;
186 
189  double Threshold;
190 
191 private:
193  void operator=(const vtkHyperOctreeSampleFunction&); // Not implemented.
194 };
195 
196 #endif
abstract interface for implicit functions
#define VTK_GRAPHICS_EXPORT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
Superclass for algorithms that produce only octree as output.
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
A dataset structured as a tree where each node has exactly 2^n children.
#define VTK_DOUBLE
Definition: vtkType.h:36
#define VTK_FLOAT
Definition: vtkType.h:35
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
sample an implicit function over an hyperoctree
#define VTK_SHORT
Definition: vtkType.h:29
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
Objects that can traverse hyperoctree nodes.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
#define VTK_INT
Definition: vtkType.h:31