36 #ifndef __vtkMitkGPUVolumeRayCastMapper_h
37 #define __vtkMitkGPUVolumeRayCastMapper_h
41 #include "vtkVersionMacros.h"
42 #include "vtkVolumeMapper.h"
45 #if ((VTK_MAJOR_VERSION > 5) || ((VTK_MAJOR_VERSION == 5) && (VTK_MINOR_VERSION >= 6)))
47 class vtkVolumeProperty;
48 class vtkRenderWindow;
55 vtkTypeMacro(vtkMitkGPUVolumeRayCastMapper, vtkVolumeMapper);
56 void PrintSelf(ostream &os, vtkIndent indent)
override;
63 vtkSetClampMacro(AutoAdjustSampleDistances,
int, 0, 1);
64 vtkGetMacro(AutoAdjustSampleDistances,
int);
65 vtkBooleanMacro(AutoAdjustSampleDistances,
int);
72 vtkSetMacro(SampleDistance,
float);
73 vtkGetMacro(SampleDistance,
float);
81 vtkSetClampMacro(ImageSampleDistance,
float, 0.1f, 100.0f);
82 vtkGetMacro(ImageSampleDistance,
float);
87 vtkSetClampMacro(MinimumImageSampleDistance,
float, 0.1f, 100.0f);
88 vtkGetMacro(MinimumImageSampleDistance,
float);
93 vtkSetClampMacro(MaximumImageSampleDistance,
float, 0.1f, 100.0f);
94 vtkGetMacro(MaximumImageSampleDistance,
float);
108 vtkSetMacro(FinalColorWindow,
float);
109 vtkGetMacro(FinalColorWindow,
float);
110 vtkSetMacro(FinalColorLevel,
float);
111 vtkGetMacro(FinalColorLevel,
float);
117 vtkSetMacro(MaxMemoryInBytes, vtkIdType);
118 vtkGetMacro(MaxMemoryInBytes, vtkIdType);
124 vtkSetClampMacro(MaxMemoryFraction,
float, 0.1f, 1.0f);
125 vtkGetMacro(MaxMemoryFraction,
float);
134 vtkSetMacro(ReportProgress,
bool);
135 vtkGetMacro(ReportProgress,
bool);
142 virtual int IsRenderSupported(vtkRenderWindow *vtkNotUsed(window), vtkVolumeProperty *vtkNotUsed(property))
147 void CreateCanonicalView(vtkRenderer *ren,
151 double viewDirection[3],
154 void SetMaskInput(vtkImageData *mask);
155 vtkGetObjectMacro(MaskInput, vtkImageData);
163 vtkSetClampMacro(MaskBlendFactor,
float, 0.0f, 1.0f);
164 vtkGetMacro(MaskBlendFactor,
float);
170 void Render(vtkRenderer *, vtkVolume *)
override;
175 virtual void GPURender(vtkRenderer *, vtkVolume *) {}
182 DEPRECATED(
void ReleaseGraphicsResources(vtkWindow *)
override){};
195 virtual void GetReductionRatio(
double ratio[3]) = 0;
200 vtkMitkGPUVolumeRayCastMapper();
201 ~vtkMitkGPUVolumeRayCastMapper();
204 int ValidateRender(vtkRenderer *, vtkVolume *);
208 void CanonicalViewRender(vtkRenderer *, vtkVolume *);
211 virtual void PreRender(vtkRenderer *ren,
213 double datasetBounds[6],
214 double scalarRange[2],
215 int numberOfScalarComponents,
216 unsigned int numberOfLevels) = 0;
219 virtual void RenderBlock(vtkRenderer *ren, vtkVolume *vol,
unsigned int level) = 0;
221 virtual void PostRender(vtkRenderer *ren,
int numberOfScalarComponents) = 0;
227 void SetCellFlag(
int cellFlag);
230 float SampleDistance;
232 float ImageSampleDistance;
233 float MinimumImageSampleDistance;
234 float MaximumImageSampleDistance;
235 int AutoAdjustSampleDistances;
237 int SmallVolumeRender;
238 double BigTimeToDraw;
239 double SmallTimeToDraw;
241 float FinalColorWindow;
242 float FinalColorLevel;
244 vtkIdType MaxMemoryInBytes;
245 float MaxMemoryFraction;
248 int GeneratingCanonicalView;
249 vtkImageData *CanonicalViewImageData;
254 vtkSetClampMacro(AMRMode,
int, 0, 1);
255 vtkGetMacro(AMRMode,
int);
256 vtkBooleanMacro(AMRMode,
int);
272 virtual void ClipCroppingRegionPlanes();
274 double ClippedCroppingRegionPlanes[6];
278 vtkImageData *MaskInput;
280 float MaskBlendFactor;
282 vtkGetObjectMacro(TransformedInput, vtkImageData);
283 void SetTransformedInput(vtkImageData *);
285 vtkImageData *TransformedInput;
290 vtkImageData *LastInput;
293 vtkMitkGPUVolumeRayCastMapper(
const vtkMitkGPUVolumeRayCastMapper &);
294 void operator=(
const vtkMitkGPUVolumeRayCastMapper &);
#define MITKMAPPEREXT_EXPORT