ImFusion C++ SDK 4.5.0
ImFusion::US::PointsOnSweepManipulator Class Reference

#include <ImFusion/US/PointsOnSweepManipulator.h>

Class that handles creation and manipulation of points on ultrasound sweeps. More...

Inheritance diagram for ImFusion::US::PointsOnSweepManipulator:

Detailed Description

Class that handles creation and manipulation of points on ultrasound sweeps.

It extends the PointsOnDataManipulator to provide specific functionality for ultrasound sweeps, such as deciding whether points should be added using the 2D or 3D views, and visibility of points in the 2D view.

Public Types

enum class  DefaultPointMode { CURRENTVIEW , US2D , US3D }
 Specify the default behaviour when adding a new point. More...
enum class  PointMode { US2D , US3D }

Public Member Functions

 PointsOnSweepManipulator (PointsOnImage &pointHandler)
void init (DisplayWidgetMulti *disp) override
 Initialize the manipulator with the given display widget.
PointsOnDatapointHandler () const override
 Gets the underlying PointsOnVolume.
void startPointCreation () override
 Start the interactive creation of a new point and determines the current mode depending on defaultPointMode.
void exportPoints (AnnotationModel *annotationModel) override
 Export points to the given annotation model The points are added with the ultrasound sweep as parent data.
void setVisible (bool visible) override
 Set if points should be shown in the views or not.
void setEditable (bool editable) override
 Set if the editing of points is enabled or not.
void setPointColor (const vec3 &color) override
 Sets the color of the points.
void sweepFocusChanged ()
 Update visible points if focus has changed.
void goToPoint (int index) override
 Centers the 3D views on the point at the given index.
void setDefaultPointMode (DefaultPointMode mode)
 Specify the default behaviour when adding a new point.
DefaultPointMode defaultPointMode (DefaultPointMode mode) const
 Returns the current default point mode.
std::vector< InteractiveView * > pointViews () const override
 Return the current views showing the points.
void recomputePointViews () override
 Recomputes the views where points are visible and add points to those views.
void showVisualGuideInViews (InteractiveObject &visualGuideIObj, SharedImageSet &visualGuideImg, TransferFunction *tf=nullptr) override
 Shows the visual guide in the views. See PointCorrespondencesWidget for more details.
void hideVisualGuideInViews () override
 Hides the visual guide from all views. See PointCorrespondencesWidget for more details.
Public Member Functions inherited from ImFusion::PointsOnDataManipulator
bool isCreatingPoint () const
 Return true if it is currently creating a new point.
virtual void cancelPointCreation ()
 Cancel the interactive creation of a new point.
void onManipulatorEvent (Manipulator *src, void *eventData) override
 Called when an event occurs.
void showNames (bool show)
void setPointSize (float pointSize)
float pointSize () const
bool isEditable () const
const vec3 & pointColor () const
void storeBlendingMode2DViews (GlSlice::BlendingMode blendingMode2DView)
 Store original blending mode for 2D views.
void restoreBlendingMode2DViews (std::vector< ImageView2D * > views2d)
 Restore original blending mode for 2D views.
void setListenToDisplayChanges (bool listen=true)
 Sets whether the class should listen to display changes and add the points to new views.
bool isListeningToDisplayChanges () const
Public Member Functions inherited from ImFusion::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.

Protected Member Functions

void onPointsAdded (int first, int last) override
 These methods are called when the underlying PointsOnData structure changes.
void onPointsRemoved (int first, int last) override
void onPointsChanged (int first, int last) override
void onPointsRenamed (int first, int last) override
void onCreatePointInteraction (const vec3 &point) override
 This function is called when the user creates a point. The implementation should update of the underlying PointsOnData structure.
void onMovePointInteraction (Manipulator *src) override
 This function is called when the user moves a point. The implementation should update of the underlying PointsOnData structure.
std::vector< InteractiveView * > availableViews (PointMode mode) const
 Return a vector of views where the points should be shown according to the specified mode.
std::vector< InteractiveView * > availableViews () const override
 Return a vector of views where the points should be shown. The returned vector depends on m_pointMode.
Protected Member Functions inherited from ImFusion::PointsOnDataManipulator
void removePoint (Interactive< GlPoint, PointBasedAnnotationManipulator > *p)
 Removes a specific point from all the views.
void clearPendingPoint ()
 Removes the temporary point used in user interaction.
std::unique_ptr< Interactive< GlPoint, PointBasedAnnotationManipulator > > createInteractivePoint (const vec3 *point=nullptr, bool interactive=true, const std::string &name="")
 Creates an interactive point.
void sanitizeRange (int &first, int &last, size_t size)
 Makes sure that the range [first, last) is inside the range [0, size).
Protected Member Functions inherited from ImFusion::SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.

Protected Attributes

std::vector< std::pair< std::unique_ptr< Interactive< GlPoint, PointBasedAnnotationManipulator > >, int > > m_sweepPoints
PointMode m_pointMode = PointMode::US2D
DefaultPointMode m_defaultPointMode = DefaultPointMode::CURRENTVIEW
PointsOnImagem_pointHandler
std::unique_ptr< UltrasoundSweepm_visualGuideSweep
 Owned visual guide data of type UltrasoundSweep to display it in non-MPR views.
Protected Attributes inherited from ImFusion::PointsOnDataManipulator
std::unique_ptr< Interactive< GlPoint, PointBasedAnnotationManipulator > > m_pendingPoint
 Pending point currently being set.
std::vector< std::unique_ptr< Interactive< GlPoint, PointBasedAnnotationManipulator > > > m_points
vec3 m_pointColor = vec3(1.0, 0.0, 0.0)
float m_pointSize = 5.0f
DisplayWidgetMultim_disp = nullptr
bool m_isEditable = true
bool m_showNames = false
std::unique_ptr< Receiverm_receiver
bool m_isListeningToDisplayChanges = true
Datam_visualGuideData = nullptr
 Pointer to the visual guide data.
InteractiveObjectm_visualGuideIObj = nullptr
 Pointer to the visual guide interactive object.
std::vector< GlSlice::BlendingModem_blendingMode2DViewsRestore
 Backup to restore blending mode for 2D views on hiding of visual guide.

Member Enumeration Documentation

◆ DefaultPointMode

Specify the default behaviour when adding a new point.

Enumerator
US2D 

< Use 3D if 2D view is not shown

US3D 

< Add point to the 2D sweep view

Member Function Documentation

◆ init()

void ImFusion::US::PointsOnSweepManipulator::init ( DisplayWidgetMulti * disp)
overridevirtual

Initialize the manipulator with the given display widget.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ pointHandler()

PointsOnData & ImFusion::US::PointsOnSweepManipulator::pointHandler ( ) const
overridevirtual

Gets the underlying PointsOnVolume.

Implements ImFusion::PointsOnDataManipulator.

◆ startPointCreation()

void ImFusion::US::PointsOnSweepManipulator::startPointCreation ( )
overridevirtual

Start the interactive creation of a new point and determines the current mode depending on defaultPointMode.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ exportPoints()

void ImFusion::US::PointsOnSweepManipulator::exportPoints ( AnnotationModel * annotationModel)
overridevirtual

Export points to the given annotation model The points are added with the ultrasound sweep as parent data.

After exporting, all the points are removed from the manipulator.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ setVisible()

void ImFusion::US::PointsOnSweepManipulator::setVisible ( bool visible)
overridevirtual

Set if points should be shown in the views or not.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ setEditable()

void ImFusion::US::PointsOnSweepManipulator::setEditable ( bool editable)
overridevirtual

Set if the editing of points is enabled or not.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ setPointColor()

void ImFusion::US::PointsOnSweepManipulator::setPointColor ( const vec3 & color)
overridevirtual

Sets the color of the points.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ goToPoint()

void ImFusion::US::PointsOnSweepManipulator::goToPoint ( int index)
overridevirtual

Centers the 3D views on the point at the given index.

Sets the focus of the sweep to the frame where the point is so that it appears in the 2D view.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ pointViews()

std::vector< InteractiveView * > ImFusion::US::PointsOnSweepManipulator::pointViews ( ) const
overridevirtual

Return the current views showing the points.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ recomputePointViews()

void ImFusion::US::PointsOnSweepManipulator::recomputePointViews ( )
overridevirtual

Recomputes the views where points are visible and add points to those views.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ showVisualGuideInViews()

void ImFusion::US::PointsOnSweepManipulator::showVisualGuideInViews ( InteractiveObject & visualGuideIObj,
SharedImageSet & visualGuideImg,
TransferFunction * tf = nullptr )
overridevirtual

Shows the visual guide in the views. See PointCorrespondencesWidget for more details.

Implements ImFusion::PointsOnDataManipulator.

◆ hideVisualGuideInViews()

void ImFusion::US::PointsOnSweepManipulator::hideVisualGuideInViews ( )
overridevirtual

Hides the visual guide from all views. See PointCorrespondencesWidget for more details.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ onPointsAdded()

void ImFusion::US::PointsOnSweepManipulator::onPointsAdded ( int first,
int last )
overrideprotectedvirtual

These methods are called when the underlying PointsOnData structure changes.

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ onPointsRemoved()

void ImFusion::US::PointsOnSweepManipulator::onPointsRemoved ( int first,
int last )
overrideprotectedvirtual

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ onPointsChanged()

void ImFusion::US::PointsOnSweepManipulator::onPointsChanged ( int first,
int last )
overrideprotectedvirtual

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ onPointsRenamed()

void ImFusion::US::PointsOnSweepManipulator::onPointsRenamed ( int first,
int last )
overrideprotectedvirtual

Reimplemented from ImFusion::PointsOnDataManipulator.

◆ onCreatePointInteraction()

void ImFusion::US::PointsOnSweepManipulator::onCreatePointInteraction ( const vec3 & point)
overrideprotectedvirtual

This function is called when the user creates a point. The implementation should update of the underlying PointsOnData structure.

Implements ImFusion::PointsOnDataManipulator.

◆ onMovePointInteraction()

void ImFusion::US::PointsOnSweepManipulator::onMovePointInteraction ( Manipulator * src)
overrideprotectedvirtual

This function is called when the user moves a point. The implementation should update of the underlying PointsOnData structure.

Implements ImFusion::PointsOnDataManipulator.

◆ availableViews()

std::vector< InteractiveView * > ImFusion::US::PointsOnSweepManipulator::availableViews ( ) const
overrideprotectedvirtual

Return a vector of views where the points should be shown. The returned vector depends on m_pointMode.

Reimplemented from ImFusion::PointsOnDataManipulator.


The documentation for this class was generated from the following file:
  • ImFusion/US/PointsOnSweepManipulator.h
Search Tab / S to search, Esc to close