![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusion/US/PointsOnSweepManipulator.h>
Class that handles creation and manipulation of points on ultrasound sweeps. More...
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. | |
| PointsOnData & | pointHandler () 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. | |
| SignalReceiver & | operator= (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 |
| PointsOnImage & | m_pointHandler |
| std::unique_ptr< UltrasoundSweep > | m_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 |
| DisplayWidgetMulti * | m_disp = nullptr |
| bool | m_isEditable = true |
| bool | m_showNames = false |
| std::unique_ptr< Receiver > | m_receiver |
| bool | m_isListeningToDisplayChanges = true |
| Data * | m_visualGuideData = nullptr |
| Pointer to the visual guide data. | |
| InteractiveObject * | m_visualGuideIObj = nullptr |
| Pointer to the visual guide interactive object. | |
| std::vector< GlSlice::BlendingMode > | m_blendingMode2DViewsRestore |
| Backup to restore blending mode for 2D views on hiding of visual guide. | |
|
strong |
|
overridevirtual |
Initialize the manipulator with the given display widget.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overridevirtual |
Gets the underlying PointsOnVolume.
Implements ImFusion::PointsOnDataManipulator.
|
overridevirtual |
Start the interactive creation of a new point and determines the current mode depending on defaultPointMode.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
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.
|
overridevirtual |
Set if points should be shown in the views or not.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overridevirtual |
Set if the editing of points is enabled or not.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overridevirtual |
Sets the color of the points.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
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.
|
overridevirtual |
Return the current views showing the points.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overridevirtual |
Recomputes the views where points are visible and add points to those views.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overridevirtual |
Shows the visual guide in the views. See PointCorrespondencesWidget for more details.
Implements ImFusion::PointsOnDataManipulator.
|
overridevirtual |
Hides the visual guide from all views. See PointCorrespondencesWidget for more details.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overrideprotectedvirtual |
These methods are called when the underlying PointsOnData structure changes.
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overrideprotectedvirtual |
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overrideprotectedvirtual |
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overrideprotectedvirtual |
Reimplemented from ImFusion::PointsOnDataManipulator.
|
overrideprotectedvirtual |
This function is called when the user creates a point. The implementation should update of the underlying PointsOnData structure.
Implements ImFusion::PointsOnDataManipulator.
|
overrideprotectedvirtual |
This function is called when the user moves a point. The implementation should update of the underlying PointsOnData structure.
Implements ImFusion::PointsOnDataManipulator.
|
overrideprotectedvirtual |
Return a vector of views where the points should be shown. The returned vector depends on m_pointMode.
Reimplemented from ImFusion::PointsOnDataManipulator.