24 #ifndef vtkGPUVolumeRayCastMapper_h
25 #define vtkGPUVolumeRayCastMapper_h
26 #include <unordered_map>
29 #include "vtkRenderingVolumeModule.h"
32 VTK_ABI_NAMESPACE_BEGIN
51 vtkSetClampMacro(AutoAdjustSampleDistances,
vtkTypeBool, 0, 1);
52 vtkGetMacro(AutoAdjustSampleDistances,
vtkTypeBool);
53 vtkBooleanMacro(AutoAdjustSampleDistances,
vtkTypeBool);
62 vtkSetClampMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool, 0, 1);
63 vtkGetMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool);
64 vtkBooleanMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool);
106 vtkSetMacro(SampleDistance,
float);
107 vtkGetMacro(SampleDistance,
float);
118 vtkSetClampMacro(ImageSampleDistance,
float, 0.1f, 100.0f);
119 vtkGetMacro(ImageSampleDistance,
float);
127 vtkSetClampMacro(MinimumImageSampleDistance,
float, 0.1f, 100.0f);
128 vtkGetMacro(MinimumImageSampleDistance,
float);
136 vtkSetClampMacro(MaximumImageSampleDistance,
float, 0.1f, 100.0f);
137 vtkGetMacro(MaximumImageSampleDistance,
float);
154 vtkSetMacro(FinalColorWindow,
float);
155 vtkGetMacro(FinalColorWindow,
float);
156 vtkSetMacro(FinalColorLevel,
float);
157 vtkGetMacro(FinalColorLevel,
float);
166 vtkSetMacro(MaxMemoryInBytes,
vtkIdType);
167 vtkGetMacro(MaxMemoryInBytes,
vtkIdType);
176 vtkSetClampMacro(MaxMemoryFraction,
float, 0.1f, 1.0f);
177 vtkGetMacro(MaxMemoryFraction,
float);
189 vtkSetMacro(ReportProgress,
bool);
190 vtkGetMacro(ReportProgress,
bool);
206 double viewDirection[3],
double viewUp[3]);
244 vtkSetMacro(MaskType,
int);
245 vtkGetMacro(MaskType,
int);
246 void SetMaskTypeToBinary();
247 void SetMaskTypeToLabelMap();
259 vtkSetClampMacro(MaskBlendFactor,
float, 0.0f, 1.0f);
260 vtkGetMacro(MaskBlendFactor,
float);
271 vtkSetClampMacro(GlobalIlluminationReach,
float, 0.0f, 1.0f);
272 vtkGetMacro(GlobalIlluminationReach,
float);
287 vtkSetClampMacro(VolumetricScatteringBlending,
float, 0.0f, 2.0f);
288 vtkGetMacro(VolumetricScatteringBlending,
float);
317 vtkSetMacro(DepthImageScalarType,
int);
318 vtkGetMacro(DepthImageScalarType,
int);
319 void SetDepthImageScalarTypeToUnsignedChar();
320 void SetDepthImageScalarTypeToUnsignedShort();
321 void SetDepthImageScalarTypeToFloat();
338 vtkBooleanMacro(ClampDepthToBackface,
vtkTypeBool);
389 virtual void GetReductionRatio(
double ratio[3]) = 0;
414 vtkSetMacro(ColorRangeType,
int);
415 vtkGetMacro(ColorRangeType,
int);
416 vtkSetMacro(ScalarOpacityRangeType,
int);
417 vtkGetMacro(ScalarOpacityRangeType,
int);
418 vtkSetMacro(GradientOpacityRangeType,
int);
419 vtkGetMacro(GradientOpacityRangeType,
int);
451 vtkSetStringMacro(Transfer2DYAxisArray);
452 vtkGetStringMacro(Transfer2DYAxisArray);
480 void TransformInput(
int port);
493 int ValidateInputs();
512 double scalarRange[2],
int numberOfScalarComponents,
unsigned int numberOfLevels) = 0;
517 virtual void PostRender(
vtkRenderer* ren,
int numberOfScalarComponents) = 0;
525 void SetCellFlag(
int cellFlag);
526 void RemovePortInternal(
int port);
548 float GlobalIlluminationReach = 0.0;
550 float VolumetricScatteringBlending = 0.0;
606 virtual void ClipCroppingRegionPlanes();
608 using DataMap = std::unordered_map<int, vtkDataSet*>;
612 double ClippedCroppingRegionPlanes[6];
640 VTK_ABI_NAMESPACE_END
virtual void GPURender(vtkRenderer *, vtkVolume *)
Handled in the subclass - the actual render method.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
helper object to manage setting and generating contour values
represents a volume (data & properties) in a rendered scene
int GradientOpacityRangeType
Abstract class for a volume mapper.
vtkTypeBool LockSampleDistanceToInputSpacing
abstract class to specify dataset behavior
virtual void GetDepthImage(vtkImageData *)
Low level API to export the depth texture as vtkImageData in RenderToImage mode.
vtkTypeBool AutoAdjustSampleDistances
virtual void GetColorImage(vtkImageData *)
Low level API to export the color texture as vtkImageData in RenderToImage mode.
int ScalarOpacityRangeType
abstract specification for renderers
vtkIdType MaxMemoryInBytes
std::unordered_map< int, vtkDataSet * > DataMap
void Render(vtkRenderer *ren, vtkVolume *vol) override=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Proxy object to connect input/output ports.
window superclass for vtkRenderWindow
virtual vtkDataSet * GetInput()
Set/Get the input data.
vtkTypeBool RenderToImage
a simple class to control print indentation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
float ImageSampleDistance
topologically and geometrically regular array of data
float MaximumImageSampleDistance
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
vtkContourValues * DepthPassContourValues
#define VTK_SIZEHINT(...)
represents the common properties for rendering a volume.
DataMap TransformedInputs
virtual int IsRenderSupported(vtkRenderWindow *vtkNotUsed(window), vtkVolumeProperty *vtkNotUsed(property))
Based on hardware and properties, we may or may not be able to render using 3D texture mapping...
create a window for renderers to draw into
int GeneratingCanonicalView
vtkTypeBool ClampDepthToBackface
DataMap LastInputs
This is needed only to check if the input data has been changed since the last Render() call...
float MinimumImageSampleDistance
std::vector< int > RemovedPorts
static vtkAlgorithm * New()
char * Transfer2DYAxisArray
Define the array used for the Y axis of transfer 2D.
Ray casting performed on the GPU.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageData * CanonicalViewImageData
void SetInputConnection(vtkAlgorithmOutput *input) override
Add/Remove input connections.
vtkDataSet * GetInput() override
Set/Get the input data.
virtual void RemoveInputConnection(int port, vtkAlgorithmOutput *input)
Remove a connection from the given input port index.