24 #ifndef vtkGPUVolumeRayCastMapper_h
25 #define vtkGPUVolumeRayCastMapper_h
26 #include <unordered_map>
29 #include "vtkRenderingVolumeModule.h"
33 VTK_ABI_NAMESPACE_BEGIN
52 vtkSetClampMacro(AutoAdjustSampleDistances,
vtkTypeBool, 0, 1);
53 vtkGetMacro(AutoAdjustSampleDistances,
vtkTypeBool);
54 vtkBooleanMacro(AutoAdjustSampleDistances,
vtkTypeBool);
57 std::vector<int>
GetPorts() {
return this->Ports; }
58 void SetPorts(std::vector<int> ports) { this->Ports = ports; }
66 vtkSetClampMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool, 0, 1);
67 vtkGetMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool);
68 vtkBooleanMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool);
111 vtkSetMacro(SampleDistance,
float);
112 vtkGetMacro(SampleDistance,
float);
123 vtkSetClampMacro(ImageSampleDistance,
float, 0.1f, 100.0f);
124 vtkGetMacro(ImageSampleDistance,
float);
132 vtkSetClampMacro(MinimumImageSampleDistance,
float, 0.1f, 100.0f);
133 vtkGetMacro(MinimumImageSampleDistance,
float);
141 vtkSetClampMacro(MaximumImageSampleDistance,
float, 0.1f, 100.0f);
142 vtkGetMacro(MaximumImageSampleDistance,
float);
159 vtkSetMacro(FinalColorWindow,
float);
160 vtkGetMacro(FinalColorWindow,
float);
161 vtkSetMacro(FinalColorLevel,
float);
162 vtkGetMacro(FinalColorLevel,
float);
171 vtkSetMacro(MaxMemoryInBytes,
vtkIdType);
172 vtkGetMacro(MaxMemoryInBytes,
vtkIdType);
181 vtkSetClampMacro(MaxMemoryFraction,
float, 0.1f, 1.0f);
182 vtkGetMacro(MaxMemoryFraction,
float);
194 vtkSetMacro(ReportProgress,
bool);
195 vtkGetMacro(ReportProgress,
bool);
211 double viewDirection[3],
double viewUp[3]);
249 vtkSetMacro(MaskType,
int);
250 vtkGetMacro(MaskType,
int);
251 void SetMaskTypeToBinary();
252 void SetMaskTypeToLabelMap();
264 vtkSetClampMacro(MaskBlendFactor,
float, 0.0f, 1.0f);
265 vtkGetMacro(MaskBlendFactor,
float);
276 vtkSetClampMacro(GlobalIlluminationReach,
float, 0.0f, 1.0f);
277 vtkGetMacro(GlobalIlluminationReach,
float);
292 vtkSetClampMacro(VolumetricScatteringBlending,
float, 0.0f, 2.0f);
293 vtkGetMacro(VolumetricScatteringBlending,
float);
322 vtkSetMacro(DepthImageScalarType,
int);
323 vtkGetMacro(DepthImageScalarType,
int);
324 void SetDepthImageScalarTypeToUnsignedChar();
325 void SetDepthImageScalarTypeToUnsignedShort();
326 void SetDepthImageScalarTypeToFloat();
343 vtkBooleanMacro(ClampDepthToBackface,
vtkTypeBool);
394 virtual void GetReductionRatio(
double ratio[3]) = 0;
419 vtkSetMacro(ColorRangeType,
int);
420 vtkGetMacro(ColorRangeType,
int);
421 vtkSetMacro(ScalarOpacityRangeType,
int);
422 vtkGetMacro(ScalarOpacityRangeType,
int);
423 vtkSetMacro(GradientOpacityRangeType,
int);
424 vtkGetMacro(GradientOpacityRangeType,
int);
456 vtkSetStringMacro(Transfer2DYAxisArray);
457 vtkGetStringMacro(Transfer2DYAxisArray);
485 void TransformInput(
int port);
498 int ValidateInputs();
517 double scalarRange[2],
int numberOfScalarComponents,
unsigned int numberOfLevels) = 0;
522 virtual void PostRender(
vtkRenderer* ren,
int numberOfScalarComponents) = 0;
530 void SetCellFlag(
int cellFlag);
531 void RemovePortInternal(
int port);
553 float GlobalIlluminationReach = 0.0;
555 float VolumetricScatteringBlending = 0.0;
611 virtual void ClipCroppingRegionPlanes();
613 using DataMap = std::unordered_map<int, vtkDataSet*>;
617 double ClippedCroppingRegionPlanes[6];
645 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
void SetPorts(std::vector< int > ports)
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
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
std::vector< int > GetPorts()
static vtkAlgorithm * New()
virtual int IsRenderSupported(vtkRenderWindow *window, vtkVolumeProperty *property)
Based on hardware and properties, we may or may not be able to render using 3D texture mapping...
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.