VTK
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
41{
42public:
44 void PrintSelf(ostream& os, vtkIndent indent);
45
47
49
53 vtkGetObjectMacro( CurrentScalars, vtkDataArray );
55
57
60 vtkSetMacro( IndependentComponents, int );
61 vtkGetMacro( IndependentComponents, int );
63
65
68 vtkSetMacro( ComputeGradientOpacity, int );
69 vtkGetMacro( ComputeGradientOpacity, int );
70 vtkBooleanMacro( ComputeGradientOpacity, int );
72
74
77 vtkSetMacro( ComputeMinMax, int );
78 vtkGetMacro( ComputeMinMax, int );
79 vtkBooleanMacro( ComputeMinMax, int );
81
83
87 vtkSetMacro( UpdateGradientOpacityFlags, int );
88 vtkGetMacro( UpdateGradientOpacityFlags, int );
89 vtkBooleanMacro( UpdateGradientOpacityFlags, int );
91
97 { return LastMinMaxBuildTime.GetMTime(); }
98
104 { return LastMinMaxFlagTime.GetMTime(); }
105
107
115 vtkSetVector4Macro( TableShift, float );
116 vtkGetVector4Macro( TableShift, float );
117 vtkSetVector4Macro( TableScale, float );
118 vtkGetVector4Macro( TableScale, float );
119 vtkSetVector4Macro( TableSize, int );
120 vtkGetVector4Macro( TableSize, int );
122
128
137 unsigned short * GetMinMaxVolume( int dims[4] );
138
144 virtual void SetCache(vtkImageData * imageCache);
145
151 static void ComputeInputExtentsForOutput( int inExt[6],
152 int inDim[3], int outExt[6], vtkImageData *inData );
153
155
160 unsigned short * GetMinNonZeroScalarIndex();
163
165
170 void SetGradientMagnitude( unsigned char ** gradientMagnitude );
171 unsigned char **GetGradientMagnitude();
173
175
179 void SetScalarOpacityTable( int c, unsigned short * t);
180 void SetGradientOpacityTable( int c, unsigned short * t );
182
188 vtkIdType ComputeOffset(const int ext[6], const int wholeExt[6],
189 int nComponents);
190
191 // This method helps debug. It writes out a specific component of the
192 // computed min-max-volume structure
193 //static void WriteMinMaxVolume( int component, unsigned short *minMaxVolume,
194 // int minMaxVolumeSize[4], const char *filename );
195
196protected:
199
204 float TableShift[4];
205 float TableScale[4];
206 int TableSize[4];
210 unsigned short * MinNonZeroScalarIndex;
212 unsigned char ** GradientMagnitude;
213 unsigned short * ScalarOpacityTable[4];
214 unsigned short * GradientOpacityTable[4];
216
217
219
221
228 vtkInformationVector **inputVector,
229 vtkInformationVector *outputVector,
230 vtkImageData ***inData,
231 vtkImageData **outData,
232 int outExt[6], int id);
233 virtual int RequestData( vtkInformation* request,
234 vtkInformationVector** inputVector,
235 vtkInformationVector* outputVector);
240
247
253 vtkImageData *minMaxVolume, int outExt[6] );
254
261 vtkImageData *minMaxVolume, int outExt[6] );
262
264
270 vtkInformation* outInfo,
271 int *uExtent);
273 vtkInformation *outInfo);
275
276private:
278 void operator=(const vtkVolumeRayCastSpaceLeapingImageFilter&) VTK_DELETE_FUNCTION;
279};
280
281#endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
general representation of visualization data
Definition: vtkDataObject.h:65
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
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:36
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,...
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.
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.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
See superclass for details.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
void InternalRequestUpdateExtent(int *, int *)
virtual void SetCurrentScalars(vtkDataArray *)
Set the scalars.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id)
If the subclass does not define an Execute method, then the task will be broken up,...
virtual vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo)
virtual void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent)
Allocate the output data.
void SetGradientOpacityTable(int c, unsigned short *t)
virtual void SetCache(vtkImageData *imageCache)
INTERNAL - Do not use Set the last cached min-max volume, as used by vtkFixedPointVolumeRayCastMapper...
void SetGradientMagnitude(unsigned char **gradientMagnitude)
Pointer to the pre-computed gradient magnitude structure.
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 copmonent INT...
unsigned char * GetMinNonZeroGradientMagnitudeIndex()
void SetScalarOpacityTable(int c, unsigned short *t)
Set the scalar opacity and gradient opacity tables computed for each component by the vtkFixedPointVo...
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248