24#ifndef vtkGPUVolumeRayCastMapper_h
25#define vtkGPUVolumeRayCastMapper_h
26#include <unordered_map>
29#include "vtkRenderingVolumeModule.h"
32VTK_ABI_NAMESPACE_BEGIN
51 vtkSetClampMacro(AutoAdjustSampleDistances,
vtkTypeBool, 0, 1);
62 vtkSetClampMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool, 0, 1);
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);
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);
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);
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);
512 double scalarRange[2],
int numberOfScalarComponents,
unsigned int numberOfLevels) = 0;
548 float GlobalIlluminationReach = 0.0;
550 float VolumetricScatteringBlending = 0.0;
608 using DataMap = std::unordered_map<int, vtkDataSet*>;
612 double ClippedCroppingRegionPlanes[6];
Proxy object to connect input/output ports.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
helper object to manage setting and generating contour values
abstract class to specify dataset behavior
Ray casting performed on the GPU.
virtual void GetDepthImage(vtkImageData *)
Low level API to export the depth texture as vtkImageData in RenderToImage mode.
void CloneInput(vtkDataSet *input, int port)
Shallow-copy the inputs into a transform-adjusted clone.
vtkDataSet * GetInput(int port) override
Set/Get the input data.
vtkTypeBool AutoAdjustSampleDistances
float MinimumImageSampleDistance
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.
void CloneInputs()
Shallow-copy the inputs into a transform-adjusted clone.
void SetMaskTypeToLabelMap()
Set the mask type, if mask is to be used.
void RemoveInputConnection(int port, int idx) override
Add/Remove input connections.
double * GetBoundsFromPort(int port)
void SetTransformedInput(vtkDataSet *)
void SetDepthImageScalarTypeToFloat()
Set/Get the scalar type of the depth texture in RenderToImage mode.
vtkTypeBool RenderToImage
virtual void GPURender(vtkRenderer *, vtkVolume *)
Handled in the subclass - the actual render method.
char * Transfer2DYAxisArray
Define the array used for the Y axis of transfer 2D.
int ValidateRender(vtkRenderer *, vtkVolume *)
This method is used by the Render() method to validate everything before attempting to render.
vtkDataSet * GetTransformedInput(int port=0)
virtual void GetColorImage(vtkImageData *)
Low level API to export the color texture as vtkImageData in RenderToImage mode.
float ImageSampleDistance
vtkContourValues * DepthPassContourValues
vtkDataSet * GetInput() override
Set/Get the input data.
vtkContourValues * GetDepthPassContourValues()
Return handle to contour values container so that values can be set by the application.
void SetInputConnection(vtkAlgorithmOutput *input) override
Add/Remove input connections.
void SetDepthImageScalarTypeToUnsignedShort()
Set/Get the scalar type of the depth texture in RenderToImage mode.
float MaximumImageSampleDistance
vtkIdType MaxMemoryInBytes
vtkTypeBool LockSampleDistanceToInputSpacing
void SetMaskInput(vtkImageData *mask)
Optionally, set a mask input.
~vtkGPUVolumeRayCastMapper() override
vtkTypeBool ClampDepthToBackface
virtual void GetReductionRatio(double ratio[3])=0
Return how much the dataset has to be reduced in each dimension to fit on the GPU.
int ValidateInput(vtkVolumeProperty *property, int port)
This method is used by the Render() method to validate everything before attempting to render.
std::vector< int > RemovedPorts
DataMap LastInputs
This is needed only to check if the input data has been changed since the last Render() call.
void CreateCanonicalView(vtkRenderer *ren, vtkVolume *volume, vtkImageData *image, int blend_mode, double viewDirection[3], double viewUp[3])
void SetDepthImageScalarTypeToUnsignedChar()
Set/Get the scalar type of the depth texture in RenderToImage mode.
int ValidateInputs()
This method is used by the Render() method to validate everything before attempting to render.
std::unordered_map< int, vtkDataSet * > DataMap
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this mapper.
void TransformInput(int port)
A transformation is applied (translation) to the input.
void Render(vtkRenderer *, vtkVolume *) override
Initialize rendering for this volume.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RemoveInputConnection(int port, vtkAlgorithmOutput *input) override
Add/Remove input connections.
virtual void PreRender(vtkRenderer *ren, vtkVolume *vol, double datasetBounds[6], double scalarRange[2], int numberOfScalarComponents, unsigned int numberOfLevels)=0
int ScalarOpacityRangeType
virtual void RenderBlock(vtkRenderer *ren, vtkVolume *vol, unsigned int level)=0
vtkImageData * CanonicalViewImageData
void SetInputConnection(int port, vtkAlgorithmOutput *input) override
Add/Remove input connections.
static vtkGPUVolumeRayCastMapper * New()
int GetInputCount()
Number of currently active ports.
int GeneratingCanonicalView
vtkGPUVolumeRayCastMapper()
virtual void ClipCroppingRegionPlanes()
Compute the cropping planes clipped by the bounds of the volume.
int FillInputPortInformation(int port, vtkInformation *info) override
Handle inputs.
vtkDataSet * FindData(int port, DataMap &container)
void SetMaskTypeToBinary()
Set the mask type, if mask is to be used.
void RemovePortInternal(int port)
DataMap TransformedInputs
virtual void PostRender(vtkRenderer *ren, int numberOfScalarComponents)=0
int GradientOpacityRangeType
void SetCellFlag(int cellFlag)
Called by the AMR Volume Mapper.
void CanonicalViewRender(vtkRenderer *, vtkVolume *)
topologically and geometrically regular array of data
a simple class to control print indentation
create a window for renderers to draw into
abstract specification for renderers
Abstract class for a volume mapper.
represents the common properties for rendering a volume.
represents a volume (data & properties) in a rendered scene
window superclass for vtkRenderWindow
#define VTK_SIZEHINT(...)