ImFusion SDK 4.3
GlSliceIndicator Class Reference

#include <ImFusion/GL/GlSliceIndicator.h>

Renderer to show the position/orientation of GlSlice instances in context of other Views. More...

+ Inheritance diagram for GlSliceIndicator:

Detailed Description

Renderer to show the position/orientation of GlSlice instances in context of other Views.

This GlObject will visualize existing GlSlice[View]s in other SliceViews and VolumeViews by rendering indicators at the location where the slices are in the coordinate system of the parent view. By default this will be lines the slices intersect in SliceViews and an outline/border in VolumeViews. The appearance can be customized: the RenderMode2d applies to all slices(), while the RenderMode3d is a per-slice setting.

See also
  • GUI::SliceIndicator for a wrapper class that add input event handling to manipulate the GlSlice position and orientation by dragging the intersection lines in other SliceViews.

Public Types

enum class  RenderMode2d { Nothing = 0 , Line = 1 << 1 , Thickness = 1 << 2 , OrientationMarkers = 1 << 3 }
 Enumeration for selecting how to render the cross-section between this MPR and other MPR slice views. More...
 
enum class  RenderMode3d {
  Nothing = 0 , Border = 1 << 0 , ImageContent = 1 << 1 , Centerlines = 1 << 2 ,
  Plane = 1 << 3
}
 Enumeration for selecting what to render inside a GlVolumeView. More...
 
- Public Types inherited from GlObject
enum  RenderingOrderGroup { RenderingGroupRest , RenderingGroupMesh , RenderingGroupManipulator }
 Enumeration to determine rendering order of GlObjects in GlSliceView and GlVolumeView. More...
 

Public Member Functions

 GlSliceIndicator (const std::vector< const GlSlice * > &slices={})
 Instantiate a new instance that will show indicators for the given slices.
 
const std::vector< const GlSlice * > & slices () const
 Returns the list of slice views for which to render.
 
void setSlices (const std::vector< const GlSlice * > &value)
 Sets the list of slice views for which to render.
 
Flags< RenderMode2drenderMode2d () const
 Returns what is shown when rendering the cross-section with other MPR views.
 
void setRenderMode2d (Flags< RenderMode2d > value)
 Sets what is shown when rendering the cross-section with other MPR views.
 
Flags< RenderMode3drenderMode3d (const GlSlice *sliceView) const
 Returns what is shown when sliceView is rendered inside a GlVolumeView.
 
void setRenderMode3d (const GlSlice *sliceView, Flags< RenderMode3d > value)
 Sets what is shown when sliceView is rendered inside a GlVolumeView.
 
double lineWidth () const
 Returns the width of rendered lines.
 
void setLineWidth (double value)
 Sets the width of rendered lines.
 
bool hidesOrientationMarkersForObliqueAngles () const
 Returns the whether to hide orientation markers if the angle between slice plane exceeds a few degrees.
 
void setHideOrientationMarkersForObliqueAngles (bool value)
 Sets the whether to hide orientation markers if the angle between slice plane exceeds a few degrees.
 
bool showsCrosshairIn3d () const
 Returns the flag whether to render lines forming a cross in 3D where the MPR planes intersect.
 
void setShowCrosshairIn3d (bool value)
 Sets the flag whether to render lines forming a cross in 3D where the MPR planes intersect.
 
ImageInfoDataComponent::AnatomicalOrientationType defaultAnatomicalOrientation () const
 Returns the anatomical orientation type to use for orientation markers if unknown/unspecified.
 
void setDefaultAnatomicalOrientation (ImageInfoDataComponent::AnatomicalOrientationType value)
 Sets the anatomical orientation type to use for orientation markers if unknown/unspecified.
 
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.
 
- Public Member Functions inherited from GlObject
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.
 
- 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 GlObject
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
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Enumeration Documentation

◆ RenderMode2d

enum class RenderMode2d
strong

Enumeration for selecting how to render the cross-section between this MPR and other MPR slice views.

Enumerator
Nothing 

Don't render MPR cross-sections at all.

Line 

Render the actual MPR cross-section lines.

Thickness 

Render slice thickness indicators in MPR cross-sections.

OrientationMarkers 

Render orientation markers in MPR cross-sections.

◆ RenderMode3d

enum class RenderMode3d
strong

Enumeration for selecting what to render inside a GlVolumeView.

Enumerator
Nothing 

Don't render MPR cross-sections at all.

Border 

Render the surrounding border of the slice.

ImageContent 

Render the actual image content.

Centerlines 

Render the centerlines of the slice.

Plane 

Render the slice as semi-transparent plane.

Member Function Documentation

◆ draw()

void draw ( const GlView & view)
overridevirtual

Draw the object in 3D space.

Implements GlObject.

◆ bounds()

Geometry::AlignedBox bounds ( ) const
overridevirtual

Get the axis-aligned bounding box of this GlObject in world space.

Return an empty (default-constructed) AlignedBox object if the GlObject does not reside in world space.

Implements GlObject.

◆ typeName()

std::string typeName ( ) const
inlineoverridevirtual

Return unique identifier for this object class used for serialization.

Implements GlObject.


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