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);
136  void SetOutputScalarTypeToDouble()
137  {this->SetOutputScalarType(VTK_DOUBLE);}
138  void SetOutputScalarTypeToFloat()
139  {this->SetOutputScalarType(VTK_FLOAT);}
140  void SetOutputScalarTypeToLong()
141  {this->SetOutputScalarType(VTK_LONG);}
142  void SetOutputScalarTypeToUnsignedLong()
143  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
144  void SetOutputScalarTypeToInt()
145  {this->SetOutputScalarType(VTK_INT);}
146  void SetOutputScalarTypeToUnsignedInt()
147  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
148  void SetOutputScalarTypeToShort()
149  {this->SetOutputScalarType(VTK_SHORT);}
150  void SetOutputScalarTypeToUnsignedShort()
151  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
152  void SetOutputScalarTypeToChar()
153  {this->SetOutputScalarType(VTK_CHAR);}
154  void SetOutputScalarTypeToUnsignedChar()
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