![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GL/GlSliceRendererImage.h>
Enables GlSlice to render normal images/volumes (SharedImageSet). More...
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.
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. | |
![]() | |
GlSliceRenderer ()=default | |
Creates a new GlSliceRenderer using the given decorator for masking. | |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
![]() | |
std::vector< Param > | m_params |
List of all registered Parameter and SubProperty instances. | |
enum InterpolationMode : int |
|
strong |
|
explicit |
Cretaes a new GlSliceRendererImage.
maskDecorator | Decorator to use for mask rendering. Usually, this is the parent GlSlice. |
is3d | Flag whether this renderer is supposed to display 3D data (instead of 2D data). |
|
overridevirtual |
Returns the name for identification/GUI usage of this slice renderer.
Implements GlSliceRenderer.
|
overridevirtual |
Returns whether this slice renderer is capable of displaying the given data.
Implements GlSliceRenderer.
|
overridevirtual |
Renders the data in the given configuration.
viewState | GlState object defining view and projection matrices. |
slice | Slice on which to render the data. |
data | The data to render |
displayOptions | The display options to use for rendering. |
encodeDistance | Flag whether to encode the distance to the border in the secondary color buffer. |
Implements GlSliceRenderer.
|
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.
Implements GlSliceRenderer.
Returns the 2D extent of the data when rendering it onto slice in pixels.
Implements GlSliceRenderer.
|
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.
|
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.