VTK
vtkCheckerboardSplatter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCheckerboardSplatter.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 =========================================================================*/
98 #ifndef vtkCheckerboardSplatter_h
99 #define vtkCheckerboardSplatter_h
100 
101 #include "vtkImagingHybridModule.h" // For export macro
102 #include "vtkImageAlgorithm.h"
103 
104 #define VTK_ACCUMULATION_MODE_MIN 0
105 #define VTK_ACCUMULATION_MODE_MAX 1
106 #define VTK_ACCUMULATION_MODE_SUM 2
107 
108 class vtkDoubleArray;
109 class vtkCompositeDataSet;
110 
111 class VTKIMAGINGHYBRID_EXPORT vtkCheckerboardSplatter : public vtkImageAlgorithm
112 {
113 public:
115  void PrintSelf(ostream& os, vtkIndent indent);
116 
123 
125 
129  void SetSampleDimensions(int i, int j, int k);
130  void SetSampleDimensions(int dim[3]);
131  vtkGetVectorMacro(SampleDimensions,int,3);
133 
135 
141  vtkSetVector6Macro(ModelBounds,double);
142  vtkGetVectorMacro(ModelBounds,double,6);
144 
146 
156  vtkSetClampMacro(Footprint,int,0,VTK_INT_MAX);
157  vtkGetMacro(Footprint,int);
159 
161 
167  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
168  vtkGetMacro(Radius,double);
170 
172 
177  vtkSetClampMacro(ScaleFactor,double,0.0,VTK_DOUBLE_MAX);
178  vtkGetMacro(ScaleFactor,double);
180 
182 
187  vtkSetMacro(ExponentFactor,double);
188  vtkGetMacro(ExponentFactor,double);
190 
192 
195  vtkSetMacro(ScalarWarping,int);
196  vtkGetMacro(ScalarWarping,int);
197  vtkBooleanMacro(ScalarWarping,int);
199 
201 
206  vtkSetMacro(NormalWarping,int);
207  vtkGetMacro(NormalWarping,int);
208  vtkBooleanMacro(NormalWarping,int);
210 
212 
219  vtkSetClampMacro(Eccentricity,double,0.001,VTK_DOUBLE_MAX);
220  vtkGetMacro(Eccentricity,double);
222 
224 
232  vtkSetClampMacro(AccumulationMode,int,
234  vtkGetMacro(AccumulationMode,int);
236  {this->SetAccumulationMode(VTK_ACCUMULATION_MODE_MIN);}
238  {this->SetAccumulationMode(VTK_ACCUMULATION_MODE_MAX);}
240  {this->SetAccumulationMode(VTK_ACCUMULATION_MODE_SUM);}
243 
245 
250  vtkSetMacro(OutputScalarType,int);
251  vtkGetMacro(OutputScalarType,int);
253  {this->SetOutputScalarType(VTK_DOUBLE);}
255  {this->SetOutputScalarType(VTK_FLOAT);}
257 
259 
264  vtkSetMacro(Capping,int);
265  vtkGetMacro(Capping,int);
266  vtkBooleanMacro(Capping,int);
268 
270 
274  vtkSetMacro(CapValue,double);
275  vtkGetMacro(CapValue,double);
277 
279 
286  vtkSetMacro(NullValue,double);
287  vtkGetMacro(NullValue,double);
289 
291 
298  vtkSetClampMacro(MaximumDimension,int,0,255);
299  vtkGetMacro(MaximumDimension,int);
301 
303 
310  vtkSetClampMacro(ParallelSplatCrossover,int,0,255);
311  vtkGetMacro(ParallelSplatCrossover,int);
313 
319  vtkInformation *outInfo);
320 
321 protected:
324 
332 
333  int OutputScalarType; //the type of output scalars
334  int SampleDimensions[3]; // dimensions of volume to splat into
335  double Radius; // Radius factor in the Gaussian exponential function
336  int Footprint; // maximum distance splat propagates (in voxels 0->Dim)
337  double ExponentFactor; // scale exponent of gaussian function
338  double ModelBounds[6]; // bounding box of splatting dimensions
339  double Origin[3], Spacing[3]; // output geometry
340  int NormalWarping; // on/off warping of splat via normal
341  double Eccentricity;// elliptic distortion due to normals
342  int ScalarWarping; // on/off warping of splat via scalar
343  double ScaleFactor; // splat size influenced by scale factor
344  int Capping; // Cap side of volume to close surfaces
345  double CapValue; // value to use for capping
346  int AccumulationMode; // how to combine scalar values
347  double NullValue; // initial value of voxels
348  unsigned char MaximumDimension; // max resolution of checkerboard
349  int ParallelSplatCrossover; //the point at which parallel splatting occurs
350 
351 private:
352  vtkCheckerboardSplatter(const vtkCheckerboardSplatter&) VTK_DELETE_FUNCTION;
353  void operator=(const vtkCheckerboardSplatter&) VTK_DELETE_FUNCTION;
354 };
355 
356 #endif
splat points into a volume with an elliptical, Gaussian distribution
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetSampleDimensions(int i, int j, int k)
Set / get the dimensions of the sampling structured point set.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called in response to a REQUEST_DATA request from the executive.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
static vtkCheckerboardSplatter * New()
Construct object with dimensions=(50,50,50); automatic computation of bounds; a Footprint of 2; a Rad...
const char * GetAccumulationModeAsString()
void SetSampleDimensions(int dim[3])
void ComputeModelBounds(vtkDataSet *input, vtkImageData *output, vtkInformation *outInfo)
Compute the size of the sample bounding box automatically from the input data.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
abstract superclass for composite (multi-block or AMR) datasets
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
dynamic, self-adjusting array of double
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
#define VTK_ACCUMULATION_MODE_SUM
#define VTK_ACCUMULATION_MODE_MIN
#define VTK_ACCUMULATION_MODE_MAX
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_DOUBLE
Definition: vtkType.h:59
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163
#define VTK_FLOAT
Definition: vtkType.h:58
#define VTK_INT_MAX
Definition: vtkType.h:153