33 #ifndef vtkGPUVolumeRayCastMapper_h 34 #define vtkGPUVolumeRayCastMapper_h 35 #include <unordered_map> 39 #include <vtkRenderingVolumeModule.h> 59 vtkSetClampMacro(AutoAdjustSampleDistances,
vtkTypeBool, 0, 1);
60 vtkGetMacro(AutoAdjustSampleDistances,
vtkTypeBool);
61 vtkBooleanMacro(AutoAdjustSampleDistances,
vtkTypeBool);
70 vtkSetClampMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool, 0, 1);
71 vtkGetMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool);
72 vtkBooleanMacro(LockSampleDistanceToInputSpacing,
vtkTypeBool);
114 vtkSetMacro(SampleDistance,
float);
115 vtkGetMacro(SampleDistance,
float);
126 vtkSetClampMacro(ImageSampleDistance,
float, 0.1f, 100.0f);
127 vtkGetMacro(ImageSampleDistance,
float);
135 vtkSetClampMacro(MinimumImageSampleDistance,
float, 0.1f, 100.0f);
136 vtkGetMacro(MinimumImageSampleDistance,
float);
144 vtkSetClampMacro(MaximumImageSampleDistance,
float, 0.1f, 100.0f);
145 vtkGetMacro(MaximumImageSampleDistance,
float);
162 vtkSetMacro(FinalColorWindow,
float);
163 vtkGetMacro(FinalColorWindow,
float);
164 vtkSetMacro(FinalColorLevel,
float);
165 vtkGetMacro(FinalColorLevel,
float);
174 vtkSetMacro(MaxMemoryInBytes,
vtkIdType);
175 vtkGetMacro(MaxMemoryInBytes,
vtkIdType);
184 vtkSetClampMacro(MaxMemoryFraction,
float, 0.1f, 1.0f);
185 vtkGetMacro(MaxMemoryFraction,
float);
197 vtkSetMacro(ReportProgress,
bool);
198 vtkGetMacro(ReportProgress,
bool);
214 double viewDirection[3],
double viewUp[3]);
252 vtkSetMacro(MaskType,
int);
253 vtkGetMacro(MaskType,
int);
254 void SetMaskTypeToBinary();
255 void SetMaskTypeToLabelMap();
267 vtkSetClampMacro(MaskBlendFactor,
float, 0.0f, 1.0f);
268 vtkGetMacro(MaskBlendFactor,
float);
297 vtkSetMacro(DepthImageScalarType,
int);
298 vtkGetMacro(DepthImageScalarType,
int);
299 void SetDepthImageScalarTypeToUnsignedChar();
300 void SetDepthImageScalarTypeToUnsignedShort();
301 void SetDepthImageScalarTypeToFloat();
318 vtkBooleanMacro(ClampDepthToBackface,
vtkTypeBool);
369 virtual void GetReductionRatio(
double ratio[3]) = 0;
394 vtkSetMacro(ColorRangeType,
int);
395 vtkGetMacro(ColorRangeType,
int);
396 vtkSetMacro(ScalarOpacityRangeType,
int);
397 vtkGetMacro(ScalarOpacityRangeType,
int);
398 vtkSetMacro(GradientOpacityRangeType,
int);
399 vtkGetMacro(GradientOpacityRangeType,
int);
452 void TransformInput(
const int port);
465 int ValidateInputs();
484 double scalarRange[2],
int numberOfScalarComponents,
unsigned int numberOfLevels) = 0;
489 virtual void PostRender(
vtkRenderer* ren,
int numberOfScalarComponents) = 0;
497 void SetCellFlag(
int cellFlag);
498 void RemovePortInternal(
const int port);
573 virtual void ClipCroppingRegionPlanes();
575 using DataMap = std::unordered_map<int, vtkImageData*>;
579 double ClippedCroppingRegionPlanes[6];
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
vtkImageData * GetInput() override
Set/Get the input data.
represents a volume (data & properties) in a rendered scene
std::unordered_map< int, vtkImageData * > DataMap
int GradientOpacityRangeType
Abstract class for a volume mapper.
vtkTypeBool LockSampleDistanceToInputSpacing
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
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
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
virtual vtkImageData * GetInput()
Set/Get the input data.
#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()
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.
virtual void RemoveInputConnection(int port, vtkAlgorithmOutput *input)
Remove a connection from the given input port index.