VTK
vtkImplicitModeller.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitModeller.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 =========================================================================*/
92 #ifndef vtkImplicitModeller_h
93 #define vtkImplicitModeller_h
94 
95 #include "vtkFiltersHybridModule.h" // For export macro
96 #include "vtkImageAlgorithm.h"
97 
98 #define VTK_VOXEL_MODE 0
99 #define VTK_CELL_MODE 1
100 
101 class vtkDataArray;
102 class vtkExtractGeometry;
103 class vtkMultiThreader;
104 
106 {
107 public:
109  void PrintSelf(ostream& os, vtkIndent indent);
110 
115 
119 
121 
122  vtkGetVectorMacro(SampleDimensions,int,3);
123  void SetSampleDimensions(int i, int j, int k);
124  void SetSampleDimensions(int dim[3]);
126 
128 
132  vtkSetClampMacro(MaximumDistance,double,0.0,1.0);
133  vtkGetMacro(MaximumDistance,double);
135 
137 
139  vtkSetVector6Macro(ModelBounds,double);
140  vtkGetVectorMacro(ModelBounds,double,6);
142 
144 
148  vtkSetMacro(AdjustBounds,int);
149  vtkGetMacro(AdjustBounds,int);
150  vtkBooleanMacro(AdjustBounds,int);
152 
154 
157  vtkSetClampMacro(AdjustDistance,double,-1.0,1.0);
158  vtkGetMacro(AdjustDistance,double);
160 
162 
164  vtkSetMacro(Capping,int);
165  vtkGetMacro(Capping,int);
166  vtkBooleanMacro(Capping,int);
168 
170 
172  void SetCapValue(double value);
173  vtkGetMacro(CapValue,double);
175 
177 
185  vtkSetMacro(ScaleToMaximumDistance, int);
186  vtkGetMacro(ScaleToMaximumDistance, int);
187  vtkBooleanMacro(ScaleToMaximumDistance,int);
189 
191 
196  vtkSetClampMacro(ProcessMode, int, 0, 1);
197  vtkGetMacro(ProcessMode, int);
198  void SetProcessModeToPerVoxel() {this->SetProcessMode(VTK_VOXEL_MODE);}
199  void SetProcessModeToPerCell() {this->SetProcessMode(VTK_CELL_MODE);}
200  const char *GetProcessModeAsString(void);
202 
204 
206  vtkSetMacro(LocatorMaxLevel,int);
207  vtkGetMacro(LocatorMaxLevel,int);
209 
211 
212  vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
213  vtkGetMacro( NumberOfThreads, int );
215 
217 
219  vtkGetMacro(OutputScalarType,int);
220  void SetOutputScalarTypeToFloat(){this->SetOutputScalarType(VTK_FLOAT);};
221  void SetOutputScalarTypeToDouble(){this->SetOutputScalarType(VTK_DOUBLE);};
222  void SetOutputScalarTypeToInt(){this->SetOutputScalarType(VTK_INT);};
224  {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
225  void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
227  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
228  void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
230  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
232  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
234  {this->SetOutputScalarType(VTK_CHAR);};
236 
241  void StartAppend();
242 
249 
251  void EndAppend();
252 
253  // See the vtkAlgorithm for a desciption of what these do
257 
258 protected:
261 
262  double GetScalarTypeMax(int type);
263 
267  virtual int RequestData (vtkInformation *,
269 
270  void StartAppend(int internal);
272 
275 
276  int SampleDimensions[3];
278  double ModelBounds[6];
279  int Capping;
280  double CapValue;
288 
289  // flag to limit to one ComputeModelBounds per StartAppend
291 
292  // the max distance computed during that one call
294 
296 
297 private:
298  vtkImplicitModeller(const vtkImplicitModeller&); // Not implemented.
299  void operator=(const vtkImplicitModeller&); // Not implemented.
300 };
301 
302 #endif
303 
304 
vtkImplicitModeller::SetOutputScalarTypeToUnsignedLong
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImplicitModeller.h:226
vtkImplicitModeller::SetOutputScalarTypeToChar
void SetOutputScalarTypeToChar()
Definition: vtkImplicitModeller.h:233
vtkImplicitModeller::InternalMaxDistance
double InternalMaxDistance
Definition: vtkImplicitModeller.h:293
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
vtkImplicitModeller::SetCapValue
void SetCapValue(double value)
vtkImplicitModeller::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
vtkImplicitModeller::StartAppend
void StartAppend(int internal)
vtkgl::s
GLdouble s
Definition: vtkgl.h:11594
vtkImplicitModeller::Capping
int Capping
Definition: vtkImplicitModeller.h:279
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkImageAlgorithm.h
vtkImplicitModeller::GetScalarTypeMax
double GetScalarTypeMax(int type)
vtkImplicitModeller::GetProcessModeAsString
const char * GetProcessModeAsString(void)
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:40
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkGetVectorMacro
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:424
vtkImplicitModeller::Append
void Append(vtkDataSet *input)
vtkImplicitModeller::StartAppend
void StartAppend()
vtkImplicitModeller::SetOutputScalarTypeToLong
void SetOutputScalarTypeToLong()
Definition: vtkImplicitModeller.h:225
vtkImplicitModeller::CapValue
double CapValue
Definition: vtkImplicitModeller.h:280
vtkImplicitModeller::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkExtractGeometry
extract cells that lie either entirely inside or outside of a specified implicit function
Definition: vtkExtractGeometry.h:52
vtkImplicitModeller::NumberOfThreads
int NumberOfThreads
Definition: vtkImplicitModeller.h:274
vtkMultiThreader
A class for performing multithreaded execution.
Definition: vtkMultiThreader.h:94
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkImplicitModeller
compute distance from input geometry on structured point dataset
Definition: vtkImplicitModeller.h:106
VTKFILTERSHYBRID_EXPORT
#define VTKFILTERSHYBRID_EXPORT
Definition: vtkFiltersHybridModule.h:15
VTK_MAX_THREADS
#define VTK_MAX_THREADS
Definition: vtkConfigure.h:41
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkImplicitModeller::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:26
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImplicitModeller::SetOutputScalarTypeToUnsignedShort
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImplicitModeller.h:229
vtkImplicitModeller::ProcessMode
int ProcessMode
Definition: vtkImplicitModeller.h:284
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:35
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:36
vtkImplicitModeller::AdjustDistance
double AdjustDistance
Definition: vtkImplicitModeller.h:283
vtkImplicitModeller::Cap
void Cap(vtkDataArray *s)
vtkImplicitModeller::DataAppended
int DataAppended
Definition: vtkImplicitModeller.h:281
vtkImplicitModeller::SetOutputScalarType
void SetOutputScalarType(int type)
vtkImplicitModeller::MaximumDistance
double MaximumDistance
Definition: vtkImplicitModeller.h:277
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
VTK_VOXEL_MODE
#define VTK_VOXEL_MODE
Definition: vtkImplicitModeller.h:98
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:33
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkImplicitModeller::~vtkImplicitModeller
~vtkImplicitModeller()
vtkImplicitModeller::OutputScalarType
int OutputScalarType
Definition: vtkImplicitModeller.h:286
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
vtkImplicitModeller::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImplicitModeller.h:221
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkImplicitModeller::FillInputPortInformation
virtual int FillInputPortInformation(int, vtkInformation *)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkImplicitModeller::SetSampleDimensions
void SetSampleDimensions(int dim[3])
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:29
vtkFiltersHybridModule.h
vtkImplicitModeller::SetOutputScalarTypeToUnsignedChar
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImplicitModeller.h:231
vtkImplicitModeller::AdjustBounds
int AdjustBounds
Definition: vtkImplicitModeller.h:282
vtkImplicitModeller::vtkImplicitModeller
vtkImplicitModeller()
vtkImplicitModeller::ProcessRequest
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkImplicitModeller::LocatorMaxLevel
int LocatorMaxLevel
Definition: vtkImplicitModeller.h:285
vtkImplicitModeller::Threader
vtkMultiThreader * Threader
Definition: vtkImplicitModeller.h:273
vtkSetVector6Macro
#define vtkSetVector6Macro(name, type)
Definition: vtkSetGet.h:360
vtkImplicitModeller::ComputeModelBounds
double ComputeModelBounds(vtkDataSet *input=NULL)
vtkImplicitModeller::ScaleToMaximumDistance
int ScaleToMaximumDistance
Definition: vtkImplicitModeller.h:287
vtkImplicitModeller::SetProcessModeToPerCell
void SetProcessModeToPerCell()
Definition: vtkImplicitModeller.h:199
vtkImplicitModeller::SetOutputScalarTypeToShort
void SetOutputScalarTypeToShort()
Definition: vtkImplicitModeller.h:228
vtkImplicitModeller::New
static vtkImplicitModeller * New()
VTK_CELL_MODE
#define VTK_CELL_MODE
Definition: vtkImplicitModeller.h:99
vtkImplicitModeller::SetOutputScalarTypeToUnsignedInt
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImplicitModeller.h:223
VTK_INT
#define VTK_INT
Definition: vtkType.h:31
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkImplicitModeller::EndAppend
void EndAppend()
vtkImplicitModeller::SetSampleDimensions
void SetSampleDimensions(int i, int j, int k)
vtkImplicitModeller::SetOutputScalarTypeToInt
void SetOutputScalarTypeToInt()
Definition: vtkImplicitModeller.h:222
vtkImplicitModeller::BoundsComputed
int BoundsComputed
Definition: vtkImplicitModeller.h:290
vtkImplicitModeller::SetProcessModeToPerVoxel
void SetProcessModeToPerVoxel()
Definition: vtkImplicitModeller.h:198
vtkImplicitModeller::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkImplicitModeller.h:220