45 #ifndef vtkFastSplatter_h 46 #define vtkFastSplatter_h 48 #include "vtkImagingHybridModule.h" 65 vtkSetVector6Macro(ModelBounds,
double);
66 vtkGetVectorMacro(ModelBounds,
double,6);
73 vtkSetVector3Macro( OutputDimensions,
int );
74 vtkGetVector3Macro( OutputDimensions,
int );
77 enum { NoneLimit, ClampLimit,
ScaleLimit, FreezeScaleLimit };
87 vtkGetMacro(LimitMode,
int);
99 vtkGetMacro(MinValue,
double);
101 vtkGetMacro(MaxValue,
double);
109 vtkGetMacro(NumberOfPointsSplatted,
int);
123 double ModelBounds[6];
124 int OutputDimensions[3];
150 int NumberOfPointsSplatted;
155 double LastDataMinValue;
156 double LastDataMaxValue;
167 T minValue, T maxValue)
169 for (
vtkIdType i = 0; i < arraySize; i++)
171 if (array[i] < minValue) array[i] = minValue;
172 if (array[i] > maxValue) array[i] = maxValue;
180 T minValue, T maxValue,
181 double *dataMinValue,
double *dataMaxValue)
188 for (
int c = 0; c < numComponents; c++)
194 for (t = 1; t < numTuples; t++, a += numComponents)
196 if (min > *a) min = *a;
203 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
212 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
214 *a = ((maxValue-minValue)*(*a))/(
max-min);
221 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
240 T minValue, T maxValue,
241 double min,
double max)
246 for (
int c = 0; c < numComponents; c++)
251 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
253 *a -=
static_cast<T
>(min);
260 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
262 *a =
static_cast<T
>(((maxValue-minValue)*(*a))/(
max-min));
269 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
277 #endif //vtkFastSplatter_h
Proxy object to connect input/output ports.
A splatter optimized for splatting single kernels.
void SetLimitModeToNone()
Set/get the way voxel values will be limited.
a simple class to control print indentation
topologically and geometrically regular array of data
void vtkFastSplatterFrozenScale(T *array, int numComponents, vtkIdType numTuples, T minValue, T maxValue, double min, double max)
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetLimitModeToScale()
Set/get the way voxel values will be limited.
Generic algorithm superclass for image algs.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void vtkFastSplatterScale(T *array, int numComponents, vtkIdType numTuples, T minValue, T maxValue, double *dataMinValue, double *dataMaxValue)
void vtkFastSplatterClamp(T *array, vtkIdType arraySize, T minValue, T maxValue)
void SetLimitModeToFreezeScale()
Set/get the way voxel values will be limited.
void SetLimitModeToClamp()
Set/get the way voxel values will be limited.