![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GL/GlVolumeRenderer.h>
Interface for a class that can render volumetric data into a GlVolumeView. More...
Inheritance diagram for GlVolumeRenderer:Interface for a class that can render volumetric data into a GlVolumeView.
Implement the Configurable interface in order to provide an automatically generated GUI for configuration when using the InteractiveViewOptionsOverlay.
Classes | |
| struct | RenderTextures |
| Helper struct to encapsulate all input/output textures needed/used during direct volume rendering. More... | |
Public Member Functions | |
| virtual std::string | name () const =0 |
| Returns the name for identification/GUI usage of this volume renderer. | |
| virtual void | setData (const std::vector< std::pair< const SharedImageSet *, const DisplayOptions3d * > > &data) |
| Sets the data to render paired with the display options to use. | |
| virtual void | render (const GL::ViewState &viewState, const RenderTextures &renderTextures)=0 |
| Renders the data in the given configuration. | |
| std::vector< std::pair< const SharedImageSet *, const DisplayOptions3d * > > | data () const |
| Return the list of shown data paired with the DisplayOptions to use. | |
| virtual SharedImageSet * | imageData () const =0 |
| Returns the first SharedImageSet that is rendered by this GlVolumeRenderer. | |
| virtual vec3 | center () const =0 |
| Returns the center in world coordinates of the first shown data. | |
| virtual bool | dirty () const |
| Returns whether the scene is dirty (i.e. re-rendering is required). | |
| virtual bool | supportsOITIntegration () const |
| Returns whether this renderer supports the order-independent integration of semi-transparent scene geometry. | |
| virtual bool | supportsDeformations () const |
| Returns whether this renderer supports showing Deformations attached to images. | |
| bool | showsDeformations () const |
| Returns the flag whether to evaluate deformation fields of volumes during rendering if supported. | |
| void | setShowDeformations (bool value) |
| Sets the flag whether to evaluate deformation fields of volumes during rendering if supported. | |
| bool | lod () const |
| Returns the flag whether low LOD mode is enabled (half output render size, half sampling rate). | |
| virtual void | setLod (bool value) |
| Sets the flag whether low LOD mode is enabled (half output render size, half sampling rate). | |
| float | samplesPerVoxel () const |
| Returns the number of ray casting samples to use per smallest voxel length. | |
| void | setSamplesPerVoxel (float value) |
| Sets the number of ray casting samples to use per smallest voxel length. | |
| void | setClipPlane (std::optional< Geometry::Plane > clipPlane) |
| Sets an optional clip plane so that parts on the back (opposite the direction of the normal vector) are clipped. | |
| void | setMaxVolumesToDisplay (int value) |
| Sets the maximum number of volumes to display. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
| void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
Public Member Functions inherited from SignalReceiver | |
| SignalReceiver ()=default | |
| Default constructor. | |
| SignalReceiver (const SignalReceiver &other) | |
| Copy constructor, does not copy any existing signal connections from other. | |
| SignalReceiver & | operator= (SignalReceiver rhs) |
| Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs. | |
| virtual | ~SignalReceiver () |
| Virtual destructor disconnects from all connected signals. | |
Public Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Protected Member Functions | |
| virtual void | clearImages () |
| Called when the set of images to render is going to be reset. | |
| virtual void | markDirty () |
| Set the dirty flag so that the scene is re-rendered from scratch next time. | |
| virtual void | onTransformationChanged (const Data *sis) |
| Called when the transformation of one of the rendered images has changed. | |
| void | onDeformationEvent (const DeformationEvent &event) |
| Called when a Deformation object attached to the SharedImage has changed its state. | |
| virtual void | registerImage (const SharedImageSet *sis, int index, const DisplayOptions3d *displayOptions)=0 |
| Called for each image that shall be rendered. | |
Protected Member Functions inherited from SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
Protected Attributes | |
| std::vector< std::pair< const SharedImageSet *, const DisplayOptions3d * > > | m_currentData |
| std::vector< std::shared_ptr< SignalConnection > > | m_temporarySlots |
| signal connections created for the set of currently shown images | |
| std::unique_ptr< GL::Framebuffer > | m_fbo |
| FBO used during rendering. | |
| bool | m_dirty = true |
| bool | m_showDeformations = false |
| Flag whether to evaluate deformation fields of volumes if supported. | |
| bool | m_lod = false |
| Flag whether low LOD mode is enabled (half output render size, half sampling rate) | |
| float | m_samplesPerVoxel = 1.f |
| Ray casting samples per smallest voxel length. | |
| std::optional< Geometry::Plane > | m_clipPlane |
| Optional clipping plane to use during rendering. | |
| int | m_maxVolumesToDisplay = 4 |
| Maximum number of volumes to display. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
Additional Inherited Members | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
|
pure virtual |
Returns the name for identification/GUI usage of this volume renderer.
Implemented in GlVolumeRendererBasic, and GlVolumeRendererGlobalIllum.
|
pure virtual |
Renders the data in the given configuration.
| viewState | OpenGL state describing projection and model-view matrix to use for rendering |
| renderTextures | Struct holding all the render textures to use |
Implemented in GlVolumeRendererBasic, and GlVolumeRendererGlobalIllum.
|
pure virtual |
Returns the first SharedImageSet that is rendered by this GlVolumeRenderer.
Implemented in GlVolumeRendererBasic, and GlVolumeRendererGlobalIllum.
|
pure virtual |
Returns the center in world coordinates of the first shown data.
Implemented in GlVolumeRendererBasic, and GlVolumeRendererGlobalIllum.
|
virtual |
Returns whether this renderer supports the order-independent integration of semi-transparent scene geometry.
This flag is queried by GlVolumeView to determine whether blending OIT fragments is performed by the volume renderer (return true) or whether it should be done by the GlVolumeView prior to letting the GlVolumeRenderer render (return false). The default implementation returns false.
Reimplemented in GlVolumeRendererGlobalIllum.
|
virtual |
Returns whether this renderer supports showing Deformations attached to images.
The default implementation returns false.
Reimplemented in GlVolumeRendererBasic, and GlVolumeRendererGlobalIllum.
|
virtual |
Sets the flag whether low LOD mode is enabled (half output render size, half sampling rate).
Reimplemented in GlVolumeRendererGlobalIllum.
|
overridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.
Reimplemented in GlVolumeRendererBasic, and GlVolumeRendererGlobalIllum.
|
overridevirtual |
Configure this object instance by de-serializing the given Properties.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.
Reimplemented in GlVolumeRendererBasic, and GlVolumeRendererGlobalIllum.
|
protectedvirtual |
Called when the set of images to render is going to be reset.
Default implementation will disconnect all connections in m_temporarySlots and clear the vector.