![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Seg/GlLabelRenderer.h>
GlObject to render a label map into a GlSliceView. More...
GlObject to render a label map into a GlSliceView.
In contrast to the default render path for label maps of a GlSliceView (based on the image modality), GlLabelRenderer will not take part in the blending of multiple images that GlSlice does. This can be useful if you want to blend multiple (non-label) images and additionally show a label map on top. Furthermore, GlLabelRenderer can operate independently of the LabelDataComponent and use its own color map.
Public Member Functions | |
GlLabelRenderer (const SharedImage *labelImg) | |
Creates a new label renderer for the given label image (may be 0). | |
const SharedImage * | labelMap () const |
void | setLabelMap (const SharedImage *labelImg) |
Sets the label image (may be 0 to disable rendering). | |
const LabelDataComponent * | labelDataComponent () const |
Returns the optional LabelDataComponent to pull color configuration from. | |
void | setLabelDataComponent (const LabelDataComponent *value) |
Sets the optional LabelDataComponent to pull color configuration from. | |
const std::vector< vec3f > & | colors () const |
Returns the color map to use for label rendering when no LabelDataComponent is set. | |
void | setColors (const std::vector< vec3f > &colorMap) |
Sets the color map to use for label rendering when no LabelDataComponent is set. | |
double | opacity () const |
Returns the global opacity of all rendered labels. | |
void | setOpacity (double value) |
Sets the global opacity of all rendered labels. | |
void | draw (const GlView &view) override |
Draw the object in 3D space. | |
Geometry::AlignedBox | bounds () const override |
Get the axis-aligned bounding box of this GlObject in world space. | |
std::string | typeName () const override |
Return unique identifier for this object class used for serialization. | |
![]() | |
virtual Geometry::AlignedBox | boundsSpherical () const |
Get the spherical bounds of this GlObject in world space. | |
virtual void | setMatrix (const mat4 &m) |
Set the modelview matrix of this object. | |
virtual const mat4 & | matrix () const |
Return the modelview matrix. | |
virtual void | setVisible (bool visible) |
Set object visibility. | |
virtual bool | visible () const |
Return object visibility. | |
virtual void | setAlwaysVisible (bool alwaysVisible) |
Set if object is always visible. | |
virtual bool | alwaysVisible () const |
Return if object is always visible. | |
RenderingOrderGroup | renderingOrder () const |
Return current rendering order value for this GlObject. | |
void | setRenderingOrder (RenderingOrderGroup group) |
Set rendering order value for this GlObject. | |
void | setDraw3DIn2DView (bool draw3DIn2DView) |
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. | |
![]() | |
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 | |
![]() | |
enum | RenderingOrderGroup { RenderingGroupRest , RenderingGroupMesh , RenderingGroupManipulator } |
Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView. More... | |
![]() | |
Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
![]() | |
mat4 | m_matrix = mat4::Identity() |
Modelview transformation matrix of this object. | |
bool | m_visible = true |
Object visibility. | |
bool | m_alwaysVisible = false |
Object always visible. | |
bool | m_draw3DIn2DView |
Draw 3D objects in 2D views. This is to render 3D objects in projective 2D views. Property is not serialized. | |
RenderingOrderGroup | m_renderingOrder = RenderingGroupRest |
![]() | |
std::vector< Param > | m_params |
List of all registered Parameter and SubProperty instances. | |
void setColors | ( | const std::vector< vec3f > & | colorMap | ) |
Sets the color map to use for label rendering when no LabelDataComponent is set.
[1 .. colorMap.size()]
, i.e. a label map value of 0 will always be fully transparent when using this function.
|
overridevirtual |
|
overridevirtual |
Return unique identifier for this object class used for serialization.
Implements GlObject.