ImFusion SDK 4.3
GlSliceRenderer Class Referenceabstract

#include <ImFusion/GL/GlSliceRenderer.h>

Interface for a class that can render data into a GlSlice/GlSliceView. More...

+ Inheritance diagram for GlSliceRenderer:

Detailed Description

Interface for a class that can render data into a GlSlice/GlSliceView.

Implement the Configurable interface in order to provide an automatically generated GUI for configuration when using the InteractiveViewOptionsOverlay.

See also
ImageView2D, GlSliceView, GlSlice, InteractiveViewOptionsOverlay

Public Member Functions

 GlSliceRenderer ()=default
 Creates a new GlSliceRenderer using the given decorator for masking.
 
virtual std::string name () const =0
 Returns the name for identification/GUI usage of this slice renderer.
 
virtual bool accepts (const Data *data) const =0
 Returns whether this slice renderer is capable of displaying the given data.
 
virtual void render (const GL::ViewState &viewState, const Slice &slice, const Data &data, const DisplayOptions2d &displayOptions, bool encodeDistance)=0
 Renders the data in the given configuration.
 
virtual mat4 defaultPose (const Data &data, Slice::AnatomicalPlane originalPlane) const =0
 Returns the default view matrix to use for showing the given dataset in a slice view of the given anatomical plane.
 
virtual vec2 extent (const Slice &slice, const Data &data)=0
 Returns the 2D extent of the data when rendering it onto slice in pixels.
 
- Public Member Functions inherited from Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
 
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Additional Inherited Members

- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ name()

virtual std::string name ( ) const
pure virtual

Returns the name for identification/GUI usage of this slice renderer.

Implemented in GlSliceRendererImage, and GlSliceRendererSweep.

◆ accepts()

virtual bool accepts ( const Data * data) const
pure virtual

Returns whether this slice renderer is capable of displaying the given data.

Implemented in GlSliceRendererImage, and GlSliceRendererSweep.

◆ render()

virtual void render ( const GL::ViewState & viewState,
const Slice & slice,
const Data & data,
const DisplayOptions2d & displayOptions,
bool encodeDistance )
pure virtual

Renders the data in the given configuration.

Parameters
viewStateGlState object defining view and projection matrices.
sliceSlice on which to render the data.
dataThe data to render
displayOptionsThe display options to use for rendering.
encodeDistanceFlag whether to encode the distance to the border in the secondary color buffer.
Note
Call this method only with data that is accepted by this renderer.

Implemented in GlSliceRendererImage, and GlSliceRendererSweep.

◆ defaultPose()

virtual mat4 defaultPose ( const Data & data,
Slice::AnatomicalPlane originalPlane ) const
pure virtual

Returns the default view matrix to use for showing the given dataset in a slice view of the given anatomical plane.

This function is for instance use by the reset function of ImageView2D/GlSliceView.

Note
Call this method only with data that is accepted by this renderer.

Implemented in GlSliceRendererImage, and GlSliceRendererSweep.

◆ extent()

virtual vec2 extent ( const Slice & slice,
const Data & data )
pure virtual

Returns the 2D extent of the data when rendering it onto slice in pixels.

Note
Call this method only with data that is accepted by this renderer.

Implemented in GlSliceRendererImage, and GlSliceRendererSweep.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close