ImFusion SDK 4.3
PointsOnDataManipulator Class Referenceabstract

#include <ImFusion/GUI/PointsOnDataManipulator.h>

Interface class that handles creation and manipulation of points on Data. More...

+ Inheritance diagram for PointsOnDataManipulator:

Detailed Description

Interface class that handles creation and manipulation of points on Data.

Implementations of this interface should rely on PointsOnData for handling the points and react to the events emitted by it.

Classes

class  Receiver
 

Public Member Functions

virtual void init (DisplayWidgetMulti *disp)
 
virtual PointsOnDatapointHandler () const =0
 Gets the underlying PointsOnData
 
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)
 
virtual void setVisible (bool visible)
 Shows or hides all the points.
 
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 showVisualGuideInViews (InteractiveObject &visualGuideIObj, SharedImageSet &visualGuideImg, TransferFunction *tf=nullptr)=0
 Displays visual guide in views GlSliceView can properly render the InteractiveObject, while other views require the SharedImageSet with transfer function.
 
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

virtual void onPointsAdded (int first, int last)
 These methods are called when the underlying PointsOnData structure changes.
 
virtual void onPointsRemoved (int first, int last)
 
virtual void onPointsChanged (int first, int last)
 
virtual void onPointsRenamed (int first, int last)
 
virtual void onCreatePointInteraction (const vec3 &point)=0
 This function is called when the user creates a point. The implementation should update of the underlying PointsOnData structure.
 
virtual void onMovePointInteraction (Manipulator *src)=0
 This function is called when the user moves a point. The implementation should update of the underlying PointsOnData structure.
 
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

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 Function Documentation

◆ init()

virtual void init ( DisplayWidgetMulti * disp)
virtual

Reimplemented in PointsOnSweepManipulator.

◆ pointHandler()

virtual PointsOnData & pointHandler ( ) const
pure virtual

◆ startPointCreation()

virtual void startPointCreation ( )
virtual

Start the interactive creation of a new point.

Reimplemented in PointsOnTrackingStreamManipulator, and PointsOnSweepManipulator.

◆ exportPoints()

virtual void exportPoints ( AnnotationModel * annotationModel)
virtual

Reimplemented in PointsOnSweepManipulator.

◆ goToPoint()

virtual void goToPoint ( int index)
virtual

Reimplemented in PointsOnSweepManipulator.

◆ onManipulatorEvent()

void onManipulatorEvent ( Manipulator * src,
void * eventData )
overridevirtual

Called when an event occurs.

Parameters
srcsource of the event
eventDatapointer to event data. Zero if no event data is provided.

Implements ManipulatorListener.

◆ setVisible()

virtual void setVisible ( bool visible)
virtual

Shows or hides all the points.

Reimplemented in PointsOnImageManipulator, and PointsOnSweepManipulator.

◆ setEditable()

virtual void setEditable ( bool editable)
virtual

Enables or disables the manipulation of points.

Reimplemented in PointsOnSweepManipulator.

◆ setPointColor()

virtual void setPointColor ( const vec3 & color)
virtual

Set the color of all points.

Reimplemented in PointsOnSweepManipulator.

◆ pointViews()

virtual std::vector< InteractiveView * > pointViews ( ) const
virtual

Return the current views showing the points.

Reimplemented in PointsOnSweepManipulator.

◆ recomputePointViews()

virtual void recomputePointViews ( )
virtual

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

Reimplemented in PointsOnSweepManipulator.

◆ showVisualGuideInViews()

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

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)

Implemented in PointsOnImageManipulator, PointsOnTrackingStreamManipulator, and PointsOnSweepManipulator.

◆ hideVisualGuideInViews()

virtual void hideVisualGuideInViews ( )
virtual

Hide the visual guide from views.

Reimplemented in PointsOnSweepManipulator.

◆ onPointsAdded()

virtual void onPointsAdded ( int first,
int last )
protectedvirtual

These methods are called when the underlying PointsOnData structure changes.

Reimplemented in PointsOnImageManipulator, and PointsOnSweepManipulator.

◆ onCreatePointInteraction()

virtual void onCreatePointInteraction ( const vec3 & point)
protectedpure virtual

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

Implemented in PointsOnImageManipulator, PointsOnTrackingStreamManipulator, and PointsOnSweepManipulator.

◆ onMovePointInteraction()

virtual void onMovePointInteraction ( Manipulator * src)
protectedpure virtual

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

Implemented in PointsOnImageManipulator, PointsOnTrackingStreamManipulator, and PointsOnSweepManipulator.

◆ availableViews()

virtual std::vector< InteractiveView * > availableViews ( ) const
protectedvirtual

Return a vector of views where the points should be shown.

Reimplemented in PointsOnSweepManipulator.


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