ImFusion SDK 4.3
SweepDisplayDataController Class Reference

#include <ImFusion/US/SweepDisplayDataController.h>

GUI DataController for adjusting ultrasound sweep visualization in the display views. More...

+ Inheritance diagram for SweepDisplayDataController:

Detailed Description

GUI DataController for adjusting ultrasound sweep visualization in the display views.

It is visible when a sweep exists in the data model. It is enabled when the sweep is visible in the views.

The chosen visualization options for the sweep are kept in SweepDisplayOptions. This controller is the interface to those - it sets them upon request (button toggle) and it reacts to their change controlling the visualizations in the views. There are additionally some further options that can be configured by the SDK user.

The GUI user can choose whether the sweep is displayed in the MPR views and/or in the 3D volume view.

There is an adaptive ruler GlUltrasoundRuler that visualizes the depth of the ultrasound scan. The user can toggle it off. It is shown in the plain 2D view and if the MPR views are linked, it will show in the axial view.

The MPR views can be linked to the ultrasound or not. In the linked state, the axial view will be aligned with the focus frame upon activation of the linking and, afterward, aligned every time upon scrolling (changing the focus). When the focus frame is displayed in the axial view the ruler's visibility is on, the ruler will also be displayed. Upon unlinking, the pose of the view will be restored to its pre-linking state.

There is a button to center the views onto the selected sweep. The MPRs will be centered on the sweep and the zoom level in the volume view will be set to encompass the sweep. The plain 2D view will not be affected nor the zoom level in the MPRs.

The behavior of the controller can be modified by the SDK user.

  • Set the second MPR view to be sagittal.
  • Set the second MPR view to be sagittal.
  • Enable the scrolling in the second MPR view to follow the scanline direction.
  • Limit the scrolling to the selection, see Selection.

If the blending of the views makes the sweep less than 10% visible, its fan is going to be visualized in the axial view. The SDK user can set the color and width of the fan.

Public Slots

void onShow (bool flag)
 Sweep is shown or hidden in the 3D world.
 
void onLink (bool flag)
 MPR planes are linked to focus frame of sweep.
 
void on3dMode (bool flag)
 3D visualization mode is toggled
 
void onRuler (bool flag)
 The visibility of displayed ruler is toggled See GlUltrasoundRuler.
 
void onCenter ()
 Moves the 3D camera of the view to show the US sweep at the center It will not change the plain 2D view.
 
void onSelectionChanged ()
 Invokes the method selectionChanged(const SharedImageSet*) with m_us.
 
void onSettingsChanged ()
 Called when the global settings are changed.
 

Signals

void mprLinked (bool linked)
 A signal emitted upon mpr linkage request.
 

Public Member Functions

void init () override
 Two-step initialization function to be implemented by subclasses.
 
std::string title () const override
 Returns the shown widget title if the controller is shown in a mode that supports this (e.g.
 
void onVisibleDataChanged (const DataList &data) override
 Called by MainWindowBase in the case that the currently visible data has changed.
 
void updateRuler ()
 Without changing selection or visible data, only updates the US ruler scale, for instance after the image size was changed.
 
void updateFanGeometry (bool updatePoints=true)
 Only updates the fan geometry and its visibility.
 
void setSecondLinkPlaneSagittal (bool flag)
 If enabled, the second link MPR plane is horizontal, to resemble a sagittal DICOM plane (given that the first is axial) The view matrix would be Pose::eulerToMat(vec3::Zero(), {-90.0, 0.0, 90.0}) if true and otherwise Pose::eulerToMat(vec3::Zero(), {0.0, -90.0, 0.0}).
 
void setEnableScanlineScrolling (bool flag)
 If enabled, scrolling in the second link MPR plane will follow the scanline directions before and after.
 
void setLimitAxialScrollToSelection (bool flag)
 If enabled, scrolling in the first linked MRP plane will be limited by the selection.
 
void setKeepLinkConfig (bool flag)
 If enabled, try to keep the relative in-plane configuration of all MPRs during focus change.
 
bool secondLinkPlaneSagittal () const
 Return the orientation mode of the second link plane.
 
bool hasScanlineScrollingEnabled () const
 Return the scrolling mode of the second link plane.
 
bool keepLinkConfig () const
 Return the flag whether the in-plane MPR config is kept.
 
bool isMprLinked ()
 Returns if any of the shown sweeps have MPR linking enabled.
 
bool isRulerVisible ()
 Returns if any of the shown sweeps have a visible ruler.
 
void setFanStyle (const vec4 &color, float lineWidth)
 Sets the US fan style.
 
void updateMPRLinking ()
 Updates the state of the MPR linking. Call when link state is changed from outside.
 
void updateMPRResetMatrices (ViewGroup *vg, Data *data)
 Update the MPR reset matrices used in case of unlinking, with the default pose of the provided data.
 
void setInvertFocusFrameScrollDir (bool invert)
 Sets if the scrolling direction of the focus frame should be inverted.
 
bool isFocusFrameScrollDirInverted () const
 Returns if the scrolling direction of the focus frame is inverted.
 
void setPlanes (UltrasoundSweep *us, std::vector< ImageView2D * > views, bool suppressAnimation)
 Sets the views' matrix according to the sweep's focus frame. Used for MPR linking.
 
void onBlendFactorChanged ()
 Blending of multiple datasets might turn on/off fan geometry visualization.
 
- Public Member Functions inherited from DataController
std::string factoryName () const
 Returns the name used to identify this DataController in the factory.
 
void setFactoryName (const std::string &factoryName)
 Sets the name used to identify this DataController in the factory.
 
std::vector< LocationsupportedLocations () const override
 Returns the list of locations in which this controller is allowed to be placed by the parent MainWindowBase.
 
Location preferredLocation () const override
 Returns the preferred location in which the parent MainWindowBase should place this controller.
 
- Public Member Functions inherited from Controller
void setMainWindowBase (MainWindowBase *mw)
 Complete the initialization by providing the parent MainWindowBase instance hosting the controller by setting m_main and m_disp and eventually call init().
 
virtual void onSelectedDataChanged (const DataList &)
 Called by MainWindowBase in the case that the selection in the data model has changed.
 
virtual void onLocationChanged (Location newLocation)
 Callback function called by the parent MainWindowBase/ControllerDecorator whenever the place was changed.
 
Location location () const
 Convenience function to query the current controller Location from the parent ControllerDecorator.
 
ControllerDecoratorgetDecorator () const
 Convenience function to return m_main->getControllerDecorator(this) if m_main is set or nullptr otherwise.
 
template<typename T>
T * getDecorator () const
 Convenience function to dynamic_cast the return value of getDecorator() to a derived type.
 
- 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
 
- Public Member Functions inherited from SignalReceiver
 SignalReceiver ()=default
 Default constructor.
 
 SignalReceiver (const SignalReceiver &other)
 Copy constructor, does not copy any existing signal connections from other.
 
SignalReceiveroperator= (SignalReceiver rhs)
 Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs.
 
virtual ~SignalReceiver ()
 Virtual destructor disconnects from all connected signals.
 

Static Public Member Functions

static mat4 getLinkedMprViewMatrix (const UltrasoundSweep &us, int plane, bool secondPlaneSag)
 Get the view matrix in the case of mpr linking of the desired plane.
 
static bool isLinkedMprViewMatrixAllowed (const UltrasoundSweep &us, const mat4 &viewMatrix)
 Checks if a view matrix is allowed in case MPRs are linked.
 
static bool createCompatible (const DataList &data, DataController **a=nullptr)
 
- Static Public Member Functions inherited from DataController
static bool createCompatible (const DataList &, DataController **=0)
 Factory interface for DataControllers: If data is compatible with data controller return true.
 

Protected Member Functions

void matrixChanged (const Data *data)
 Update linked MPR views and ruler according to the new sweep matrix.
 
void selectionChanged (const SharedImageSet *data)
 Update linked MPR views and ruler according to the new selection.
 
bool supportsToolBar () const override
 The data controller can be put in at the location of the toolbar.
 
- Protected Member Functions inherited from SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Additional Inherited Members

- Public Types inherited from Controller
enum class  Location : int {
  Unknown = -1 , Naked = 0 , PrimaryDock = 1 , SecondaryDock = 2 ,
  Detached = 3 , ToolBar = 4 , UserLocation = 100
}
 Enumeration of possible placement/decoration options of a Controller. More...
 
- Public Attributes inherited from Controller
Signal signalTitleChanged
 Signal emitted when the title() has changed.
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 
- Protected Attributes inherited from DataController
std::string m_factoryName
 
- Protected Attributes inherited from Controller
MainWindowBasem_main = nullptr
 The parent MainWindowBase instance hosting this Controller.
 
DisplayWidgetMultim_disp = nullptr
 The main DisplayWidget instance, convenience shortcut for m_main->display().
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ getLinkedMprViewMatrix()

static mat4 getLinkedMprViewMatrix ( const UltrasoundSweep & us,
int plane,
bool secondPlaneSag )
static

Get the view matrix in the case of mpr linking of the desired plane.

The second plane is one of the following, depending on secondPlaneSag:

  • Pose::eulerToMat(vec3::Zero(), {-90.0, 0.0, 90.0}) if secondPlaneSag is true,
  • Pose::eulerToMat(vec3::Zero(), {0.0, -90.0, 0.0}) otherwise
    Parameters
    usThe sweep whose position needs to be taken into account
    planeThe number of plane the matrix is for. Expects 1 for axial, 2 for elevational or 3 for the perpendicular to the two. Otherwise, return the identity.
    secondPlaneSagAn option determining the rotation of the elevational plane.

◆ isLinkedMprViewMatrixAllowed()

static bool isLinkedMprViewMatrixAllowed ( const UltrasoundSweep & us,
const mat4 & viewMatrix )
static

Checks if a view matrix is allowed in case MPRs are linked.

A violation is detected if the convex fan apex is outside of the view plane.

◆ init()

void init ( )
overridevirtual

Two-step initialization function to be implemented by subclasses.

This function is called by setMainWindowBase() after the m_disp and m_main attributes have been set and hence a complete initialization of the controller is possible at this point.

Reimplemented from DataController.

◆ title()

std::string title ( ) const
overridevirtual

Returns the shown widget title if the controller is shown in a mode that supports this (e.g.

when in dock). Unless overridden, it returns the factory name.

Reimplemented from DataController.

◆ onVisibleDataChanged()

void onVisibleDataChanged ( const DataList & )
overridevirtual

Called by MainWindowBase in the case that the currently visible data has changed.

Reimplemented from Controller.

◆ onShow

void onShow ( bool flag)
slot

Sweep is shown or hidden in the 3D world.

It will not change the plain 2D view.

◆ supportsToolBar()

bool supportsToolBar ( ) const
inlineoverrideprotectedvirtual

The data controller can be put in at the location of the toolbar.

See Location

Reimplemented from DataController.


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