VTK  9.1.0
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=========================================================================*/
95#ifndef vtkCheckerboardSplatter_h
96#define vtkCheckerboardSplatter_h
97
98#include "vtkImageAlgorithm.h"
99#include "vtkImagingHybridModule.h" // For export macro
100
101#define VTK_ACCUMULATION_MODE_MIN 0
102#define VTK_ACCUMULATION_MODE_MAX 1
103#define VTK_ACCUMULATION_MODE_SUM 2
104
105class vtkDoubleArray;
107
108class VTKIMAGINGHYBRID_EXPORT vtkCheckerboardSplatter : public vtkImageAlgorithm
109{
110public:
112 void PrintSelf(ostream& os, vtkIndent indent) override;
113
120
122
126 void SetSampleDimensions(int i, int j, int k);
127 void SetSampleDimensions(int dim[3]);
128 vtkGetVectorMacro(SampleDimensions, int, 3);
130
132
138 vtkSetVector6Macro(ModelBounds, double);
139 vtkGetVectorMacro(ModelBounds, double, 6);
141
143
153 vtkSetClampMacro(Footprint, int, 0, VTK_INT_MAX);
154 vtkGetMacro(Footprint, int);
156
158
164 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
165 vtkGetMacro(Radius, double);
167
169
174 vtkSetClampMacro(ScaleFactor, double, 0.0, VTK_DOUBLE_MAX);
175 vtkGetMacro(ScaleFactor, double);
177
179
184 vtkSetMacro(ExponentFactor, double);
185 vtkGetMacro(ExponentFactor, double);
187
189
192 vtkSetMacro(ScalarWarping, vtkTypeBool);
193 vtkGetMacro(ScalarWarping, vtkTypeBool);
194 vtkBooleanMacro(ScalarWarping, vtkTypeBool);
196
198
203 vtkSetMacro(NormalWarping, vtkTypeBool);
204 vtkGetMacro(NormalWarping, vtkTypeBool);
205 vtkBooleanMacro(NormalWarping, vtkTypeBool);
207
209
216 vtkSetClampMacro(Eccentricity, double, 0.001, VTK_DOUBLE_MAX);
217 vtkGetMacro(Eccentricity, double);
219
221
229 vtkSetClampMacro(AccumulationMode, int, VTK_ACCUMULATION_MODE_MIN, VTK_ACCUMULATION_MODE_SUM);
230 vtkGetMacro(AccumulationMode, int);
231 void SetAccumulationModeToMin() { this->SetAccumulationMode(VTK_ACCUMULATION_MODE_MIN); }
232 void SetAccumulationModeToMax() { this->SetAccumulationMode(VTK_ACCUMULATION_MODE_MAX); }
233 void SetAccumulationModeToSum() { this->SetAccumulationMode(VTK_ACCUMULATION_MODE_SUM); }
236
238
243 vtkSetMacro(OutputScalarType, int);
244 vtkGetMacro(OutputScalarType, int);
245 void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
246 void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
248
250
255 vtkSetMacro(Capping, vtkTypeBool);
256 vtkGetMacro(Capping, vtkTypeBool);
257 vtkBooleanMacro(Capping, vtkTypeBool);
259
261
265 vtkSetMacro(CapValue, double);
266 vtkGetMacro(CapValue, double);
268
270
277 vtkSetMacro(NullValue, double);
278 vtkGetMacro(NullValue, double);
280
282
289 vtkSetClampMacro(MaximumDimension, int, 0, 255);
290 vtkGetMacro(MaximumDimension, int);
292
294
301 vtkSetClampMacro(ParallelSplatCrossover, int, 0, 255);
302 vtkGetMacro(ParallelSplatCrossover, int);
304
310
311protected:
313 ~vtkCheckerboardSplatter() override = default;
314
315 int FillInputPortInformation(int port, vtkInformation* info) override;
318
319 int OutputScalarType; // the type of output scalars
320 int SampleDimensions[3]; // dimensions of volume to splat into
321 double Radius; // Radius factor in the Gaussian exponential function
322 int Footprint; // maximum distance splat propagates (in voxels 0->Dim)
323 double ExponentFactor; // scale exponent of gaussian function
324 double ModelBounds[6]; // bounding box of splatting dimensions
325 double Origin[3], Spacing[3]; // output geometry
326 vtkTypeBool NormalWarping; // on/off warping of splat via normal
327 double Eccentricity; // elliptic distortion due to normals
328 vtkTypeBool ScalarWarping; // on/off warping of splat via scalar
329 double ScaleFactor; // splat size influenced by scale factor
330 vtkTypeBool Capping; // Cap side of volume to close surfaces
331 double CapValue; // value to use for capping
332 int AccumulationMode; // how to combine scalar values
333 double NullValue; // initial value of voxels
334 unsigned char MaximumDimension; // max resolution of checkerboard
335 int ParallelSplatCrossover; // the point at which parallel splatting occurs
336
337private:
339 void operator=(const vtkCheckerboardSplatter&) = delete;
340};
341
342#endif
splat points into a volume with an elliptical, Gaussian distribution
void SetOutputScalarTypeToDouble()
Set what type of scalar data this source should generate.
void SetAccumulationModeToSum()
Specify the scalar accumulation mode.
static vtkCheckerboardSplatter * New()
Construct object with dimensions=(50,50,50); automatic computation of bounds; a Footprint of 2; a Rad...
void SetAccumulationModeToMin()
Specify the scalar accumulation mode.
~vtkCheckerboardSplatter() override=default
void SetSampleDimensions(int i, int j, int k)
Set / get the dimensions of the sampling structured point set.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
const char * GetAccumulationModeAsString()
Specify the scalar accumulation mode.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetAccumulationModeToMax()
Specify the scalar accumulation mode.
void SetSampleDimensions(int dim[3])
Set / get the dimensions of the sampling structured point set.
void ComputeModelBounds(vtkDataSet *input, vtkImageData *output, vtkInformation *outInfo)
Compute the size of the sample bounding box automatically from the input data.
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
void SetOutputScalarTypeToFloat()
Set what type of scalar data this source should generate.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
abstract superclass for composite (multi-block or AMR) datasets
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
dynamic, self-adjusting array of double
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_ACCUMULATION_MODE_SUM
#define VTK_ACCUMULATION_MODE_MIN
#define VTK_ACCUMULATION_MODE_MAX
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_FLOAT
Definition: vtkType.h:54
#define VTK_INT_MAX
Definition: vtkType.h:155