ImFusion SDK 4.3
GlSliceRendererImage Class Reference

#include <ImFusion/GL/GlSliceRendererImage.h>

Enables GlSlice to render normal images/volumes (SharedImageSet). More...

+ Inheritance diagram for GlSliceRendererImage:

Detailed Description

Enables GlSlice to render normal images/volumes (SharedImageSet).

In GlSlice, this renderer is also referred to as the default renderer. This renderer accepts either 2D or 3D images exclusively depending on the flag given during construction.

See also
GlSlice, SharedImageSet

Public Types

enum  InterpolationMode : int { NearestNeighbor = 0 , LinearInterpolation = 1 , CubicInterpolation = 2 }
 Interpolation mode during rendering. More...
 
enum class  ReductionMode { Averaging = 0 , Maximum = 1 }
 Reduction mode when rendering thick MPRs. More...
 

Public Member Functions

 GlSliceRendererImage (bool is3d)
 Cretaes a new GlSliceRendererImage.
 
double thickness () const
 Returns the thickness of the MPR slice in mm.
 
void setThickness (double value)
 Sets the thickness of the MPR slice in mm.
 
ReductionMode reductionMode () const
 Returns the reduction mode when rendering thick MPRs.
 
void setReductionMode (ReductionMode value)
 Sets the reduction mode when rendering thick MPRs.
 
InterpolationMode interpolationMode () const
 Returns the interpolation mode.
 
void setInterpolationMode (InterpolationMode value)
 Sets the interpolation mode.
 
bool ignoreMatrix () const
 Returns the flag whether to ignore the image matrix during rendering.
 
void setIgnoreMatrix (bool value)
 Sets the flag whether to ignore the image matrix during rendering.
 
bool rendersFocusImageOnly () const
 Returns the flag whether to all selected images of the SharedImageSet also for 2D image sets.
 
void setRenderFocusImageOnly (bool value)
 Sets the flag whether to all selected images of the SharedImageSet also for 2D image sets.
 
std::string name () const override
 Returns the name for identification/GUI usage of this slice renderer.
 
bool accepts (const Data *data) const override
 Returns whether this slice renderer is capable of displaying the given data.
 
void render (const GL::ViewState &viewState, const Slice &slice, const Data &data, const DisplayOptions2d &displayOptions, bool encodeDistance) override
 Renders the data in the given configuration.
 
mat4 defaultPose (const Data &data, Slice::AnatomicalPlane originalPlane) const override
 Returns the default view matrix to use for showing the given dataset in a slice view of the given anatomical plane.
 
vec2 extent (const Slice &slice, const Data &data) override
 Returns the 2D extent of the data when rendering it onto slice in pixels.
 
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
 
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
 
- Public Member Functions inherited from GlSliceRenderer
 GlSliceRenderer ()=default
 Creates a new GlSliceRenderer using the given decorator for masking.
 
- 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
 
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 Enumeration Documentation

◆ InterpolationMode

enum InterpolationMode : int

Interpolation mode during rendering.

Enumerator
NearestNeighbor 

Nearest neighbor interpolation.

LinearInterpolation 

Linear interpolation.

CubicInterpolation 

Cubic interpolation.

◆ ReductionMode

enum class ReductionMode
strong

Reduction mode when rendering thick MPRs.

Enumerator
Averaging 

Average intensities of all pixels.

Maximum 

Use maximum intensity.

Constructor & Destructor Documentation

◆ GlSliceRendererImage()

GlSliceRendererImage ( bool is3d)
explicit

Cretaes a new GlSliceRendererImage.

Parameters
maskDecoratorDecorator to use for mask rendering. Usually, this is the parent GlSlice.
is3dFlag whether this renderer is supposed to display 3D data (instead of 2D data).

Member Function Documentation

◆ name()

std::string name ( ) const
overridevirtual

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

Implements GlSliceRenderer.

◆ accepts()

bool accepts ( const Data * data) const
overridevirtual

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

Implements GlSliceRenderer.

◆ render()

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

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.

Implements GlSliceRenderer.

◆ defaultPose()

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

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.

Implements GlSliceRenderer.

◆ extent()

vec2 extent ( const Slice & slice,
const Data & data )
overridevirtual

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.

Implements GlSliceRenderer.

◆ configure()

void configure ( const Properties * p)
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.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * p) const
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.

See also
configure() for the inverse functionality

Reimplemented from Configurable.


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