VTK  9.5.20251127
vtkCheckerboardSplatter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
85
86#ifndef vtkCheckerboardSplatter_h
87#define vtkCheckerboardSplatter_h
88
89#include "vtkImageAlgorithm.h"
90#include "vtkImagingHybridModule.h" // For export macro
91
92#define VTK_ACCUMULATION_MODE_MIN 0
93#define VTK_ACCUMULATION_MODE_MAX 1
94#define VTK_ACCUMULATION_MODE_SUM 2
95
96VTK_ABI_NAMESPACE_BEGIN
97class vtkDoubleArray;
99
100class VTKIMAGINGHYBRID_EXPORT vtkCheckerboardSplatter : public vtkImageAlgorithm
101{
102public:
104 void PrintSelf(ostream& os, vtkIndent indent) override;
105
112
114
118 void SetSampleDimensions(int i, int j, int k);
119 void SetSampleDimensions(int dim[3]);
120 vtkGetVectorMacro(SampleDimensions, int, 3);
122
124
130 vtkSetVector6Macro(ModelBounds, double);
131 vtkGetVectorMacro(ModelBounds, double, 6);
133
135
145 vtkSetClampMacro(Footprint, int, 0, VTK_INT_MAX);
146 vtkGetMacro(Footprint, int);
148
150
156 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
157 vtkGetMacro(Radius, double);
159
161
166 vtkSetClampMacro(ScaleFactor, double, 0.0, VTK_DOUBLE_MAX);
167 vtkGetMacro(ScaleFactor, double);
169
171
176 vtkSetMacro(ExponentFactor, double);
177 vtkGetMacro(ExponentFactor, double);
179
181
186 vtkBooleanMacro(ScalarWarping, vtkTypeBool);
188
190
197 vtkBooleanMacro(NormalWarping, vtkTypeBool);
199
201
208 vtkSetClampMacro(Eccentricity, double, 0.001, VTK_DOUBLE_MAX);
209 vtkGetMacro(Eccentricity, double);
211
213
222 vtkGetMacro(AccumulationMode, int);
228
230
235 vtkSetMacro(OutputScalarType, int);
236 vtkGetMacro(OutputScalarType, int);
240
242
247 vtkSetMacro(Capping, vtkTypeBool);
248 vtkGetMacro(Capping, vtkTypeBool);
249 vtkBooleanMacro(Capping, vtkTypeBool);
251
253
257 vtkSetMacro(CapValue, double);
258 vtkGetMacro(CapValue, double);
260
262
269 vtkSetMacro(NullValue, double);
270 vtkGetMacro(NullValue, double);
272
274
281 vtkSetClampMacro(MaximumDimension, int, 0, 255);
282 vtkGetMacro(MaximumDimension, int);
284
286
293 vtkSetClampMacro(ParallelSplatCrossover, int, 0, 255);
294 vtkGetMacro(ParallelSplatCrossover, int);
296
302
303protected:
305 ~vtkCheckerboardSplatter() override = default;
306
307 int FillInputPortInformation(int port, vtkInformation* info) override;
310
311 int OutputScalarType; // the type of output scalars
312 int SampleDimensions[3]; // dimensions of volume to splat into
313 double Radius; // Radius factor in the Gaussian exponential function
314 int Footprint; // maximum distance splat propagates (in voxels 0->Dim)
315 double ExponentFactor; // scale exponent of gaussian function
316 double ModelBounds[6]; // bounding box of splatting dimensions
317 double Origin[3], Spacing[3]; // output geometry
318 vtkTypeBool NormalWarping; // on/off warping of splat via normal
319 double Eccentricity; // elliptic distortion due to normals
320 vtkTypeBool ScalarWarping; // on/off warping of splat via scalar
321 double ScaleFactor; // splat size influenced by scale factor
322 vtkTypeBool Capping; // Cap side of volume to close surfaces
323 double CapValue; // value to use for capping
324 int AccumulationMode; // how to combine scalar values
325 double NullValue; // initial value of voxels
326 unsigned char MaximumDimension; // max resolution of checkerboard
327 int ParallelSplatCrossover; // the point at which parallel splatting occurs
328
329private:
331 void operator=(const vtkCheckerboardSplatter&) = delete;
332};
333
334VTK_ABI_NAMESPACE_END
335#endif
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.
virtual void SetAccumulationMode(int)
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
Fill the input port information objects for this algorithm.
void SetOutputScalarTypeToFloat()
Set what type of scalar data this source should generate.
virtual void SetOutputScalarType(int)
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
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_ACCUMULATION_MODE_SUM
#define VTK_ACCUMULATION_MODE_MIN
#define VTK_ACCUMULATION_MODE_MAX
#define VTK_DOUBLE
Definition vtkType.h:44
#define VTK_DOUBLE_MAX
Definition vtkType.h:206
#define VTK_FLOAT
Definition vtkType.h:43
#define VTK_INT_MAX
Definition vtkType.h:196