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 
114  static vtkImplicitModeller *New();
115 
118  double ComputeModelBounds(vtkDataSet *input = NULL);
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 
218  void SetOutputScalarType(int type);
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 
248  void Append(vtkDataSet *input);
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 
264  virtual int RequestInformation (vtkInformation *,
267  virtual int RequestData (vtkInformation *,
269 
270  void StartAppend(int internal);
271  void Cap(vtkDataArray *s);
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 
295  virtual int FillInputPortInformation(int, vtkInformation*);
296 
297 private:
298  vtkImplicitModeller(const vtkImplicitModeller&); // Not implemented.
299  void operator=(const vtkImplicitModeller&); // Not implemented.
300 };
301 
302 #endif
303 
304 
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
compute distance from input geometry on structured point dataset
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
A class for performing multithreaded execution.
#define VTK_MAX_THREADS
Definition: vtkConfigure.h:41
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
#define VTK_DOUBLE
Definition: vtkType.h:36
#define VTK_FLOAT
Definition: vtkType.h:35
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSHYBRID_EXPORT
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
#define VTK_SHORT
Definition: vtkType.h:29
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
virtual int FillInputPortInformation(int port, vtkInformation *info)
#define VTK_VOXEL_MODE
vtkMultiThreader * Threader
#define VTK_CELL_MODE
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
extract cells that lie either entirely inside or outside of a specified implicit function ...
#define VTK_INT
Definition: vtkType.h:31