VTK  9.1.0
vtkVolumeRayCastSpaceLeapingImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkFixedPointVolumeRayCastMapper.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=========================================================================*/
32#ifndef vtkVolumeRayCastSpaceLeapingImageFilter_h
33#define vtkVolumeRayCastSpaceLeapingImageFilter_h
34
35#include "vtkRenderingVolumeModule.h" // For export macro
37
38class vtkDataArray;
39
40class VTKRENDERINGVOLUME_EXPORT vtkVolumeRayCastSpaceLeapingImageFilter
42{
43public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
50
54 vtkGetObjectMacro(CurrentScalars, vtkDataArray);
56
58
61 vtkSetMacro(IndependentComponents, int);
62 vtkGetMacro(IndependentComponents, int);
64
66
69 vtkSetMacro(ComputeGradientOpacity, vtkTypeBool);
70 vtkGetMacro(ComputeGradientOpacity, vtkTypeBool);
71 vtkBooleanMacro(ComputeGradientOpacity, vtkTypeBool);
73
75
78 vtkSetMacro(ComputeMinMax, vtkTypeBool);
79 vtkGetMacro(ComputeMinMax, vtkTypeBool);
80 vtkBooleanMacro(ComputeMinMax, vtkTypeBool);
82
84
88 vtkSetMacro(UpdateGradientOpacityFlags, vtkTypeBool);
89 vtkGetMacro(UpdateGradientOpacityFlags, vtkTypeBool);
90 vtkBooleanMacro(UpdateGradientOpacityFlags, vtkTypeBool);
92
97 vtkMTimeType GetLastMinMaxBuildTime() { return LastMinMaxBuildTime.GetMTime(); }
98
103 vtkMTimeType GetLastMinMaxFlagTime() { return LastMinMaxFlagTime.GetMTime(); }
104
106
114 vtkSetVector4Macro(TableShift, float);
115 vtkGetVector4Macro(TableShift, float);
116 vtkSetVector4Macro(TableScale, float);
117 vtkGetVector4Macro(TableScale, float);
118 vtkSetVector4Macro(TableSize, int);
119 vtkGetVector4Macro(TableSize, int);
121
127
136 unsigned short* GetMinMaxVolume(int dims[4]);
137
143 virtual void SetCache(vtkImageData* imageCache);
144
151 int inExt[6], int inDim[3], int outExt[6], vtkImageData* inData);
152
154
159 unsigned short* GetMinNonZeroScalarIndex();
162
164
169 void SetGradientMagnitude(unsigned char** gradientMagnitude);
170 unsigned char** GetGradientMagnitude();
172
174
178 void SetScalarOpacityTable(int c, unsigned short* t);
179 void SetGradientOpacityTable(int c, unsigned short* t);
181
187 vtkIdType ComputeOffset(const int ext[6], const int wholeExt[6], int nComponents);
188
189 // This method helps debug. It writes out a specific component of the
190 // computed min-max-volume structure
191 // static void WriteMinMaxVolume( int component, unsigned short *minMaxVolume,
192 // int minMaxVolumeSize[4], const char *filename );
193
194protected:
197
202 float TableShift[4];
203 float TableScale[4];
204 int TableSize[4];
208 unsigned short* MinNonZeroScalarIndex;
210 unsigned char** GradientMagnitude;
211 unsigned short* ScalarOpacityTable[4];
212 unsigned short* GradientOpacityTable[4];
214
216
218
223 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
224 int outExt[6], int id) override;
226 vtkInformationVector* outputVector) override;
229
236
241 void FillScalarOpacityFlags(vtkImageData* minMaxVolume, int outExt[6]);
242
248 void FillScalarAndGradientOpacityFlags(vtkImageData* minMaxVolume, int outExt[6]);
249
251
256 void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent) override;
259
260private:
262 void operator=(const vtkVolumeRayCastSpaceLeapingImageFilter&) = delete;
263};
264
265#endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
general representation of visualization data
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.
Generic filter that has one input.
record modification and/or execution time
Definition: vtkTimeStamp.h:52
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:69
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287