ImFusion SDK 4.3
PointsOnImageManipulator Class Reference

#include <ImFusion/GUI/PointsOnImageManipulator.h>

Class that handles creation and manipulation of points on a volume or image. More...

+ Inheritance diagram for PointsOnImageManipulator:

Detailed Description

Class that handles creation and manipulation of points on a volume or image.

It connects to the events emitted by PointsOnVolume and automatically update the displayed points It can also be used inside controllers to show/hide points on sharedImageSets depending on image focus

Public Member Functions

 PointsOnImageManipulator (PointsOnImage &pointHandler, bool ignoreMatrix=false)
 If ignoreMatrix is set to true, it changes the behavior of the class so that it shows points on the SharedImageSet.
 
void init (DisplayWidgetMulti *disp) override
 
bool ignoreTransformationMatrix () const
 
PointsOnDatapointHandler () const override
 Gets the underlying PointsOnVolume
 
void setVisible (bool visible) override
 Shows or hides all the points.
 
void showVisualGuideInViews (InteractiveObject &visualGuideIObj, SharedImageSet &visualGuideImg, TransferFunction *tf=nullptr) override
 Displays visual guide in views GlSliceView can properly render the InteractiveObject, while other views require the SharedImageSet with transfer function.
 
- Public Member Functions inherited from PointsOnDataManipulator
virtual void startPointCreation ()
 Start the interactive creation of a new point.
 
bool isCreatingPoint () const
 Return true if it is currently creating a new point.
 
virtual void cancelPointCreation ()
 Cancel the interactive creation of a new point.
 
virtual void exportPoints (AnnotationModel *annotationModel)
 
virtual void goToPoint (int index)
 
void onManipulatorEvent (Manipulator *src, void *eventData) override
 Called when an event occurs.
 
void showNames (bool show)
 
void setPointSize (float pointSize)
 
float pointSize () const
 
virtual void setEditable (bool editable)
 Enables or disables the manipulation of points.
 
bool isEditable () const
 
virtual void setPointColor (const vec3 &color)
 Set the color of all points.
 
const vec3 & pointColor () const
 
virtual std::vector< InteractiveView * > pointViews () const
 Return the current views showing the points.
 
virtual void recomputePointViews ()
 Recomputes the views where points are visible and add points to those views.
 
virtual void hideVisualGuideInViews ()
 Hide the visual guide from views.
 
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 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 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.
 
void onPointsAdded (int first, int last) override
 These methods are called when the underlying PointsOnImage structure changes.
 
void onPointsRemoved (int first, int last) override
 
void onPointsChanged (int first, int last) override
 
void onPointsRenamed (int first, int last) override
 
void updatePointsVisibility ()
 This function is used in case ignoreMatrix was set to true.
 
- Protected Member Functions inherited from PointsOnDataManipulator
virtual std::vector< InteractiveView * > availableViews () const
 Return a vector of views where the points should be shown.
 
void removePoint (Interactive< GlPoint, PointBasedAnnotationManipulator > *p)
 Removes a specific point from all the views.
 
void clearPendingPoint ()
 Removes the temporary point used in user interation.
 
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 SignalReceiver
void disconnectAll ()
 Disconnects all existing connections.
 

Protected Attributes

PointsOnImagem_pointHandler
 
bool m_visible = true
 
bool m_ignoreMatrix = false
 
- Protected Attributes inherited from 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.
 

Constructor & Destructor Documentation

◆ PointsOnImageManipulator()

PointsOnImageManipulator ( PointsOnImage & pointHandler,
bool ignoreMatrix = false )
explicit

If ignoreMatrix is set to true, it changes the behavior of the class so that it shows points on the SharedImageSet.

by creating points interactive objects, which gets updated if the selected shown image is changed Preferably used inside a controller.

Member Function Documentation

◆ init()

void init ( DisplayWidgetMulti * disp)
overridevirtual

Reimplemented from PointsOnDataManipulator.

◆ pointHandler()

PointsOnData & pointHandler ( ) const
overridevirtual

Gets the underlying PointsOnVolume

Implements PointsOnDataManipulator.

◆ setVisible()

void setVisible ( bool visible)
overridevirtual

Shows or hides all the points.

If ignoreTransformationMatrix is set to true, this function controls the visibility of the points on the current image within the SharedImageSet.

Reimplemented from PointsOnDataManipulator.

◆ showVisualGuideInViews()

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

Displays visual guide in views GlSliceView can properly render the InteractiveObject, while other views require the SharedImageSet with transfer function.

Parameters
visualGuideIObjThe visual guide interactive object
visualGuideImgThe visual guide image
tfThe transfer function (optional)

Implements PointsOnDataManipulator.

◆ onCreatePointInteraction()

void 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 PointsOnDataManipulator.

◆ onMovePointInteraction()

void onMovePointInteraction ( Manipulator * src)
overrideprotectedvirtual

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

Implements PointsOnDataManipulator.

◆ onPointsAdded()

void onPointsAdded ( int first,
int last )
overrideprotectedvirtual

These methods are called when the underlying PointsOnImage structure changes.

Reimplemented from PointsOnDataManipulator.

◆ onPointsRemoved()

void onPointsRemoved ( int first,
int last )
overrideprotectedvirtual

Reimplemented from PointsOnDataManipulator.

◆ onPointsChanged()

void onPointsChanged ( int first,
int last )
overrideprotectedvirtual

Reimplemented from PointsOnDataManipulator.

◆ onPointsRenamed()

void onPointsRenamed ( int first,
int last )
overrideprotectedvirtual

Reimplemented from PointsOnDataManipulator.

◆ updatePointsVisibility()

void updatePointsVisibility ( )
protected

This function is used in case ignoreMatrix was set to true.

It hides points of all images except the one selected in SharedImageSet


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