VTK  9.4.20250330
vtkVolumeRayCastSpaceLeapingImageFilter.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
20#ifndef vtkVolumeRayCastSpaceLeapingImageFilter_h
21#define vtkVolumeRayCastSpaceLeapingImageFilter_h
22
23#include "vtkRenderingVolumeModule.h" // For export macro
25
26VTK_ABI_NAMESPACE_BEGIN
27class vtkDataArray;
28
29class VTKRENDERINGVOLUME_EXPORT vtkVolumeRayCastSpaceLeapingImageFilter
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
37
39
43 vtkGetObjectMacro(CurrentScalars, vtkDataArray);
45
47
50 vtkSetMacro(IndependentComponents, int);
51 vtkGetMacro(IndependentComponents, int);
53
55
58 vtkSetMacro(ComputeGradientOpacity, vtkTypeBool);
59 vtkGetMacro(ComputeGradientOpacity, vtkTypeBool);
60 vtkBooleanMacro(ComputeGradientOpacity, vtkTypeBool);
62
64
67 vtkSetMacro(ComputeMinMax, vtkTypeBool);
68 vtkGetMacro(ComputeMinMax, vtkTypeBool);
69 vtkBooleanMacro(ComputeMinMax, vtkTypeBool);
71
73
77 vtkSetMacro(UpdateGradientOpacityFlags, vtkTypeBool);
78 vtkGetMacro(UpdateGradientOpacityFlags, vtkTypeBool);
79 vtkBooleanMacro(UpdateGradientOpacityFlags, vtkTypeBool);
81
86 vtkMTimeType GetLastMinMaxBuildTime() { return LastMinMaxBuildTime.GetMTime(); }
87
92 vtkMTimeType GetLastMinMaxFlagTime() { return LastMinMaxFlagTime.GetMTime(); }
93
95
103 vtkSetVector4Macro(TableShift, float);
104 vtkGetVector4Macro(TableShift, float);
105 vtkSetVector4Macro(TableScale, float);
106 vtkGetVector4Macro(TableScale, float);
107 vtkSetVector4Macro(TableSize, int);
108 vtkGetVector4Macro(TableSize, int);
110
116
125 unsigned short* GetMinMaxVolume(int dims[4]);
126
132 virtual void SetCache(vtkImageData* imageCache);
133
140 int inExt[6], int inDim[3], int outExt[6], vtkImageData* inData);
141
143
148 unsigned short* GetMinNonZeroScalarIndex();
151
153
158 void SetGradientMagnitude(unsigned char** gradientMagnitude);
159 unsigned char** GetGradientMagnitude();
161
163
167 void SetScalarOpacityTable(int c, unsigned short* t);
168 void SetGradientOpacityTable(int c, unsigned short* t);
170
176 vtkIdType ComputeOffset(const int ext[6], const int wholeExt[6], int nComponents);
177
178 // This method helps debug. It writes out a specific component of the
179 // computed min-max-volume structure
180 // static void WriteMinMaxVolume( int component, unsigned short *minMaxVolume,
181 // int minMaxVolumeSize[4], const char *filename );
182
183protected:
186
191 float TableShift[4];
192 float TableScale[4];
193 int TableSize[4];
197 unsigned short* MinNonZeroScalarIndex;
199 unsigned char** GradientMagnitude;
200 unsigned short* ScalarOpacityTable[4];
201 unsigned short* GradientOpacityTable[4];
203
205
207
212 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
213 int outExt[6], int id) override;
215 vtkInformationVector* outputVector) override;
218
225
230 void FillScalarOpacityFlags(vtkImageData* minMaxVolume, int outExt[6]);
231
237 void FillScalarAndGradientOpacityFlags(vtkImageData* minMaxVolume, int outExt[6]);
238
240
245 void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent) override;
248
249private:
251 void operator=(const vtkVolumeRayCastSpaceLeapingImageFilter&) = delete;
252};
253
254VTK_ABI_NAMESPACE_END
255#endif
abstract superclass for arrays of numeric data
general representation of visualization data
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.
Generic filter that has one input.
record modification and/or execution time
static void ComputeInputExtentsForOutput(int inExt[6], int inDim[3], int outExt[6], vtkImageData *inData)
Compute the extents and dimensions of the input that's required to generate an output min-max structu...
vtkIdType ComputeOffset(const int ext[6], const int wholeExt[6], int nComponents)
INTERNAL - Do not use Compute the offset within an image of whole extents wholeExt,...
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
See superclass for details.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
See superclass for details.
static vtkVolumeRayCastSpaceLeapingImageFilter * New()
void FillScalarOpacityFlags(vtkImageData *minMaxVolume, int outExt[6])
Fill the flags after processing the min/max/gradient structure.
vtkMTimeType GetLastMinMaxFlagTime()
Get the last execution time.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
See superclass for details.
void FillScalarAndGradientOpacityFlags(vtkImageData *minMaxVolume, int outExt[6])
Fill the flags after processing the min/max/gradient structure.
void ComputeFirstNonZeroOpacityIndices()
Compute the first non-zero scalar opacity and gradient opacity values that are encountered when march...
int GetNumberOfIndependentComponents()
Get the number of independent components for which we need to keep track of min/max.
unsigned char ** GetGradientMagnitude()
Pointer to the pre-computed gradient magnitude structure.
void InternalRequestUpdateExtent(int *, int *)
virtual void SetCurrentScalars(vtkDataArray *)
Set the scalars.
void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent) override
Allocate the output data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetGradientOpacityTable(int c, unsigned short *t)
Set the scalar opacity and gradient opacity tables computed for each component by the vtkFixedPointVo...
virtual void SetCache(vtkImageData *imageCache)
INTERNAL - Do not use Set the last cached min-max volume, as used by vtkFixedPointVolumeRayCastMapper...
vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo) override
Allocate the output data.
void SetGradientMagnitude(unsigned char **gradientMagnitude)
Pointer to the pre-computed gradient magnitude structure.
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) override
See superclass for details.
unsigned short * GetMinMaxVolume(int dims[4])
Get the raw pointer to the final computed space leaping datastructure.
vtkMTimeType GetLastMinMaxBuildTime()
Get the last execution time.
unsigned short * GetMinNonZeroScalarIndex()
Get the first non-zero scalar opacity and gradient opacity indices for each independent component INT...
unsigned char * GetMinNonZeroGradientMagnitudeIndex()
Get the first non-zero scalar opacity and gradient opacity indices for each independent component INT...
void SetScalarOpacityTable(int c, unsigned short *t)
Set the scalar opacity and gradient opacity tables computed for each component by the vtkFixedPointVo...
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287