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 =========================================================================*/
31 #ifndef __vtkVolumeRayCastSpaceLeapingImageFilter_h
32 #define __vtkVolumeRayCastSpaceLeapingImageFilter_h
33 
35 
36 class vtkDataArray;
37 
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
47 
48  virtual void SetCurrentScalars( vtkDataArray * );
49  vtkGetObjectMacro( CurrentScalars, vtkDataArray );
51 
53 
54  vtkSetMacro( IndependentComponents, int );
55  vtkGetMacro( IndependentComponents, int );
57 
59 
60  vtkSetMacro( ComputeGradientOpacity, int );
61  vtkGetMacro( ComputeGradientOpacity, int );
62  vtkBooleanMacro( ComputeGradientOpacity, int );
64 
66 
67  vtkSetMacro( ComputeMinMax, int );
68  vtkGetMacro( ComputeMinMax, int );
69  vtkBooleanMacro( ComputeMinMax, int );
71 
73 
75  vtkSetMacro( UpdateGradientOpacityFlags, int );
76  vtkGetMacro( UpdateGradientOpacityFlags, int );
77  vtkBooleanMacro( UpdateGradientOpacityFlags, int );
79 
81 
83  unsigned long GetLastMinMaxBuildTime()
84  { return LastMinMaxBuildTime.GetMTime(); }
86 
88 
90  unsigned long GetLastMinMaxFlagTime()
91  { return LastMinMaxFlagTime.GetMTime(); }
93 
95 
101  vtkSetVector4Macro( TableShift, float );
102  vtkGetVector4Macro( TableShift, float );
103  vtkSetVector4Macro( TableScale, float );
104  vtkGetVector4Macro( TableScale, float );
105  vtkSetVector4Macro( TableSize, int );
106  vtkGetVector4Macro( TableSize, int );
108 
111  int GetNumberOfIndependentComponents();
112 
119  unsigned short * GetMinMaxVolume( int dims[4] );
120 
123  virtual void SetCache(vtkImageData * imageCache);
124 
126 
129  static void ComputeInputExtentsForOutput( int inExt[6],
130  unsigned int inDim[3], int outExt[6], vtkImageData *inData );
132 
134 
136  unsigned short * GetMinNonZeroScalarIndex();
137  unsigned char * GetMinNonZeroGradientMagnitudeIndex();
139 
140  //BTX
142 
145  void SetGradientMagnitude( unsigned char ** gradientMagnitude );
146  unsigned char **GetGradientMagnitude();
148 
150 
152  void SetScalarOpacityTable( int c, unsigned short * t);
153  void SetGradientOpacityTable( int c, unsigned short * t );
154  //ETX
156 
159  unsigned long ComputeOffset(int ext[6], int wholeExt[6], int nComponents);
160 
161  //BTX
162  // This method helps debug. It writes out a specific component of the
163  // computed min-max-volume structure
164  //static void WriteMinMaxVolume( int component, unsigned short *minMaxVolume,
165  // int minMaxVolumeSize[4], const char *filename );
166  //ETX
167 
168 protected:
171 
176  float TableShift[4];
177  float TableScale[4];
178  int TableSize[4];
182  unsigned short * MinNonZeroScalarIndex;
184  unsigned char ** GradientMagnitude;
185  unsigned short * ScalarOpacityTable[4];
186  unsigned short * GradientOpacityTable[4];
188 
189 
190  void InternalRequestUpdateExtent(int *, int*);
191 
193 
194  virtual int RequestUpdateExtent(vtkInformation *,
197  void ThreadedRequestData( vtkInformation *request,
198  vtkInformationVector **inputVector,
199  vtkInformationVector *outputVector,
200  vtkImageData ***inData,
201  vtkImageData **outData,
202  int outExt[6], int id);
203  virtual int RequestData( vtkInformation* request,
204  vtkInformationVector** inputVector,
205  vtkInformationVector* outputVector);
206  virtual int RequestInformation( vtkInformation *,
210 
214  void ComputeFirstNonZeroOpacityIndices();
215 
217 
220  void FillScalarOpacityFlags(
221  vtkImageData *minMaxVolume, int outExt[6] );
223 
225 
228  void FillScalarAndGradientOpacityFlags(
229  vtkImageData *minMaxVolume, int outExt[6] );
231 
233 
236  virtual void AllocateOutputData( vtkImageData *out, int *uExtent );
239 
240 private:
242  void operator=(const vtkVolumeRayCastSpaceLeapingImageFilter&); // Not implemented.
243 };
244 
245 #endif
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:33
#define VTK_VOLUMERENDERING_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Generic filter that has one input..
a simple class to control print indentation
Definition: vtkIndent.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual void AllocateOutputData(vtkImageData *out, int *uExtent)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:70