47 #ifndef vtkFastSplatter_h
48 #define vtkFastSplatter_h
65 vtkSetVector6Macro(ModelBounds,
double);
66 vtkGetVectorMacro(ModelBounds,
double,6);
71 vtkSetVector3Macro( OutputDimensions,
int );
72 vtkGetVector3Macro( OutputDimensions,
int );
76 enum { NoneLimit, ClampLimit,
ScaleLimit, FreezeScaleLimit };
85 vtkSetMacro(LimitMode,
int);
86 vtkGetMacro(LimitMode,
int);
95 vtkSetMacro(MinValue,
double);
96 vtkGetMacro(MinValue,
double);
97 vtkSetMacro(MaxValue,
double);
98 vtkGetMacro(MaxValue,
double);
104 vtkGetMacro(NumberOfPointsSplatted,
int);
116 double ModelBounds[6];
117 int OutputDimensions[3];
162 T minValue, T maxValue)
164 for (
vtkIdType i = 0; i < arraySize; i++)
166 if (array[i] < minValue) array[i] = minValue;
167 if (array[i] > maxValue) array[i] = maxValue;
175 T minValue, T maxValue,
176 double *dataMinValue,
double *dataMaxValue)
183 for (
int c = 0; c < numComponents; c++)
189 for (t = 1; t < numTuples; t++, a += numComponents)
191 if (min > *a) min = *a;
192 if (max < *a) max = *a;
198 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
207 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
209 *a = ((maxValue-minValue)*(*a))/(max-min);
216 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
235 T minValue, T maxValue,
236 double min,
double max)
241 for (
int c = 0; c < numComponents; c++)
246 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
248 *a -=
static_cast<T
>(min);
255 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
257 *a =
static_cast<T
>(((maxValue-minValue)*(*a))/(max-min));
264 for (t = 0, a = array+c; t < numTuples; t++, a += numComponents)
274 #endif //vtkFastSplatter_h
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Proxy object to connect input/output ports.
A splatter optimized for splatting single kernels.
void SetLimitModeToNone()
a simple class to control print indentation
topologically and geometrically regular array of data
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int NumberOfPointsSplatted
void vtkFastSplatterFrozenScale(T *array, int numComponents, vtkIdType numTuples, T minValue, T maxValue, double min, double max)
virtual int FillInputPortInformation(int port, vtkInformation *info)
void SetLimitModeToScale()
Generic algorithm superclass for image algs.
void PrintSelf(ostream &os, vtkIndent indent)
static vtkAlgorithm * New()
#define VTKIMAGINGHYBRID_EXPORT
void vtkFastSplatterScale(T *array, int numComponents, vtkIdType numTuples, T minValue, T maxValue, double *dataMinValue, double *dataMaxValue)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void vtkFastSplatterClamp(T *array, vtkIdType arraySize, T minValue, T maxValue)
void SetLimitModeToFreezeScale()
void SetLimitModeToClamp()