MeVisLab Toolbox Reference
SoView2DCSOExtensibleEditor Class Reference

#include <SoView2DCSOExtensibleEditor.h>

Inheritance diagram for SoView2DCSOExtensibleEditor:
SoView2DExtension SoInteractionProviderNode SoInteractionOwner SoInteractionProvider

Public Types

enum  CSORenderOnImagesDependingOnCreationModes { ON_ALL_IMAGES = 0 , ONLY_ON_IMAGES_THEY_WERE_CREATED_ON = 1 , ONLY_ON_IMAGES_THEY_WERE_NOT_CREATED_ON = 2 , ONLY_ON_IMAGES_THEY_CAN_BE_TRANSFORMED_TO = 3 }
 Modes to control the rendering of CSOs depending on the images they were created on. More...
 
- Public Types inherited from SoView2DExtension
enum  Sign { ZERO , NEGATIVE , POSITIVE }
 defines the sign of a number, with zero as an extra value More...
 
- Public Types inherited from SoInteractionProvider
typedef SoInteractionProvider *(* GetProviderFunc) (SoNode *)
 

Public Member Functions

 SoView2DCSOExtensibleEditor ()
 Constructor.
 
void getExtensions (ExtensionList &extensions)
 Collects attached extensions to the given list.
 
ml::CSOListgetInputCSOList ()
 Returns a pointer to the input CSOList or NULL if nothing valid is attached.
 
std::string getDefaultCreatorString () const
 Returns a default creator id string that indicates that the first found editor should create CSOs.
 
void pointerLeftWindow () override
 Is called when mouse pointer leaves the window.
 
void pointerPosition (const SoPointerPosition &pos) override
 Is called on moving the mouse, sets the CSO id under the cursor.
 
ml::CSOVisualizationSettingsgetVisualizationSettings ()
 Returns the pointer to a optionally attached CSOVisualizationSettings object.
 
SoCSOEditorExtensiongetActiveEditor () const
 Returns the attached editor that is active for creating new CSOs (or NULL if there is not any).
 
void setActiveEditor (SoCSOEditorExtension *editor, bool storeLastEditor=true)
 Sets the active editor, use this only to temporarily set a modification editor.
 
void resetLastActiveEditor ()
 Resets the active editor to the last active editor if it was set.
 
SoCSODefaultRenderergetDefaultRenderer ()
 Returns the default renderer.
 
void setInteractionModifier (int mode)
 Sets the interaction mode as determined by a pointing action.
 
int getInteractionModifier () const
 Returns the interaction mode as determined by a pointing action.
 
void setCSOUnderTheMouseId (int id)
 Sets the csoUnderTheMouseId field, only if the id changes.
 
bool shouldShowCSOAtAll (ml::CSO *cso)
 Returns whether the given CSO should be rendered at all, that is whether its shows state is true and its eventual CSOGroup's show state is true.
 
bool shouldShowCSOForCurrentTimePoint (const CSODrawView2DInfos &view2DInfos, ml::CSO *cso)
 Returns whether the given CSO should be rendered for the current time point.
 
bool shouldShowCSORegardingParallelState (const CSODrawSliceInformation &sliceInfo, const CSODrawView2DInfos &view2DInfos, ml::CSO *cso)
 Returns whether the given CSO should be rendered regarding its parallel state.
 
bool shouldShowCSOBeyondSlice (const CSODrawSliceInformation &sliceInfo, const CSODrawView2DInfos &view2DInfos, ml::CSO *cso)
 Returns whether the given CSO should be rendered beyond the current slice.
 
bool shouldShowCSOOnImageWithId (const CSODrawView2DInfos &view2DInfos, ml::CSO *cso)
 Returns whether the given CSO should be rendered on a particular image, identified by its DICOM SeriesInstanceUID.
 
bool hasRegistrationInformation (const SoPointerPosition &pos, ml::CSO *cso)
 Returns whether a registration exists.
 
ml::AbstractTransformationPtr getRegistrationInformation (const SoPointerPosition &pos, ml::CSO *cso)
 Returns a registration if it exists for the given CSO on the given image (as a SoPointerPosition), or NULL.
 
bool hasTransformationProvider () const
 Returns if the editor has a transformation provider.
 
ml::AbstractTransformationPtr getTransformation (const ml::CoordinateSystemReference &from, const ml::CoordinateSystemReference &to)
 Returns a transformation if existing, NULL otherwise.
 
bool isSameImage (const ml::CoordinateSystemReference &from, const ml::CoordinateSystemReference &to)
 Returns whether the given coordinate references reference the same image.
 
void transformCSO (ml::CSO *cso, const ml::AbstractTransformationPtr &transformation)
 Transforms the given CSO on base of registration information.
 
void fillCSOSliceInformation (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, CSODrawSliceInformation &sliceInfo, const ml::Matrix4 &worldToVoxelMatrix, const CSOVoxelSlab &csoSlab)
 Fills the relation of the given CSO to the current slice.
 
void startEditingCSO (const SoPointerPosition &pos, ml::CSO *cso)
 Sets the isEditingExistingCSO field to TRUE and stores the current viewer's name in the CSO's userData.
 
void stopEditingCSO ()
 Sets the isEditingExistingCSO field to FALSE.
 
void toggleCancelCommandIsActiveForModifications (bool isActive)
 Toggles the activation of the cancel command without any additional checks; to be used with care and for modification editors.
 
bool isSelectionAllowedWithDefaultRenderer () const
 Returns whether a CSO can be selected by the internal default renderer.
 
void setCreateActionTrigger (const SoPointingAction::Trigger &trigger)
 Sets the CSOCreateAction trigger.
 
void setCreateActionTriggerToDefault ()
 Sets the CSOCreateAction trigger to its default, according to the trigger fields.
 
void cancel ()
 Cancels the current interaction.
 
ml::CoordinateSystemReference getCoordinateSystemReference (ml::CSO *cso)
 
ml::CoordinateSystemReference getCoordinateSystemReference (SoView2D *viewer)
 
ml::CoordinateSystemReference getCoordinateSystemReference (const CSODrawView2DInfos &view2DInfos)
 
ml::CoordinateSystemReference getCoordinateSystemReference (const SoPointerPosition &pos)
 
- Public Member Functions inherited from SoView2DExtension
 SoView2DExtension ()
 Constructor.
 
void init ()
 setup internal state
 
virtual void updateValues ()
 Update fields to local variables, may be reimplemented if you want to update additional local vars.
 
virtual void endDrawing (View2DSliceList *)
 
virtual void overwriteDrawingSettings (SoView2DDrawingSettings &)
 
View2DEventgetEvent ()
 get the current event (when inside of evalEvent)
 
float getSelectDist ()
 Set the distance tolerance on hit checking in pixels.
 
bool isPointInsideDeviceRect (float pointX, float pointY, float centerX, float centerY, float hitRectangleSize=0.0)
 returns whether the given point is inside a rectangle around the given center.
 
void drawMiniRect (float xp, float yp, float ext, float lineWidth=1.f)
 Draws a small rectangle with given half side length and a line width.
 
void drawDashedMiniRect (float xp, float yp, float ext, float lineWidth)
 
void drawFilledMiniRect (float xp, float yp, float ext, float lineWidth=1.f)
 Draws a small filled rectangle with given half side length.
 
void drawMiniTriangle (float xp, float yp, float ext, float lineWidth=1.f)
 Draws a small triangle with given center point, half height and line width.
 
void drawFilledMiniTriangle (float xp, float yp, float ext, float lineWidth=1.f)
 Draws a small filled triangle with given center point and half height.
 
void drawMiniCircle (float xp, float yp, float ext, float lineWidth=1.f)
 Draws a small circle with given center point and radius.
 
void drawFilledMiniCircle (float xp, float yp, float ext, float lineWidth=1.f)
 Draws a small filled circle with given center point and radius.
 
void drawFixedSizeMiniCircleAt (float xp, float yp)
 Draws a fixed size small circle at the given position.
 
void drawVoxelBorder (View2DSlice *slice, float vx, float vy, float vz)
 surround the given voxel with a border
 
int getX ()
 get the x device position of current event, only returns valid result when called inside of evalEvent()
 
int getY ()
 get the y device position of current event, only returns valid result when called inside of evalEvent()
 
virtual bool isDrawingOn ()
 check if drawing is on
 
virtual bool isEditingOn ()
 check if editing is on
 
virtual bool isFixZOn ()
 check if z should stay fixed
 
virtual bool isClipToSlice ()
 check if the image is clipped to slice
 
virtual void fieldChanged (SoSensor *sensor)
 handle if any field has changed
 
bool isCreateNewMode ()
 check if extension is in createNewMode
 
void setCreateNewMode (bool flag)
 set this extension to create new objects
 
bool isCreateNewModeRequest ()
 check if extension has a request for createNewMode
 
void setCreateNewModeRequest (bool flag)
 set that extension want to become createNewMode
 
virtual bool isActive ()
 returns if the extension is active (derive this method in child) (in createNewMode or with a selected object)(called by SoView2D)
 
virtual void deleteSelectedObject ()
 deletes the currently active object (derive this method in child) (called by SoView2D)
 
virtual void getStatusString (SbString &status)
 get the current status of this extension
 
virtual bool evaluateEvent (SoView2D *view2d, View2DEvent *ec)
 
virtual bool ignoreEvent (View2DEvent *ec)
 Return true if ec has been handled before and if ignoreHandledEvents is True.
 
bool wantsMouseOverUpdates () const
 public access to _wantsMouseOverUpdateEvents
 
virtual void consumeEvent (View2DEvent *ec, bool handled=TRUE)
 Set handled-flag of ec to true (= consumed) if handled is True and setEventHandled is True.
 
int getSelectedModifierMask ()
 Get compare and ignore mask for the currently selected button/modifier combination, usable with SoPointingAction.
 
int getSelectedIgnoreMask ()
 
SoPointingAction::Trigger getPointingActionTriggerFromFields ()
 Get the trigger that matches the button/modifier field state.
 
virtual bool implementsManagedInteractionAndClassicEventHandling () const
 return true if this node is a hybrid module providing managed interaction and classic event handling - in this case SoView2D::useManagedInteraction decides which one to use
 
- Public Member Functions inherited from SoInteractionProviderNode
 SoInteractionProviderNode ()
 Default constructor.
 
 ~SoInteractionProviderNode () override
 Destructor.
 
std::string getID () const override
 Returns the id string for identifying the provider (and its actions) - this is usually the name of the scene node.
 
void objRef () override
 Memory management by reference counting; must be implemented in derived classes.
 
void objUnref () override
 
- Public Member Functions inherited from SoInteractionOwner
 SoInteractionOwner ()
 Default constructor.
 
 ~SoInteractionOwner () override
 The destructor will destroy all interactions created with this object as owner.
 
std::list< SoInteraction * > getInteractions (SoState *state) override
 Returns the list of all interactions of this provider.
 
void pointerPosition (SoState *state, const SoPointerPosition &pos) override
 Same as below, with additional SoState argument. Be defaults simply calls the below version.
 
void pointerLeftWindow (SoState *state) override
 Same as below, with additional SoState argument. Be defaults simply calls the below version.
 
void addListener (SoInteractionOwnerListenerInterface *listener)
 Add a listener object that is notified of changes in the interaction list.
 
void removeListener (SoInteractionOwnerListenerInterface *listener)
 Remove a listener object that was notified of changes in the interaction list.
 
- Public Member Functions inherited from SoInteractionProvider
 SoInteractionProvider ()
 Default constructor.
 
virtual ~SoInteractionProvider ()
 
template<class T >
std::list< T * > getInteractionsOfType (SoState *state)
 Returns list of interactions of a specific type:
 
virtual std::list< SoCommandAction * > getCommandActions (SoState *state)
 
virtual std::list< SoPointingAction * > getPointingActions (SoState *state)
 
virtual std::list< SoOffsetAction * > getOffsetActions (SoState *state)
 

Static Public Member Functions

static void initClass ()
 Initialization of inventor stuff.
 
- Static Public Member Functions inherited from SoView2DExtension
static void initClass ()
 Initializes this class.
 
static float snapToPixelCenter (float coordinateComponent)
 Snaps the coordinate component to the pixel center.
 
static void fieldChangedCB (void *data, SoSensor *sensor)
 inventor callbacks if any field has changed, calls fieldChanged
 
static bool isImageParallel (SoSFMLImage *image, View2DSliceList *dsl)
 Return true if image is parallel to the image of the slice list up to slice thickness.
 
static void enableLineStippling (const SoSFEnum &lineStyleField)
 Set/reset stippling pattern.
 
static void disableLineStippling (const SoSFEnum &lineStyleField)
 
static void getAxisOrientation (int axis, SbMatrix &matrix, char &negativeResult, char &positiveResult)
 Geometry helpers.
 
static float pointToLineDistance (SbVec3f point, SbVec3f line1, SbVec3f line2)
 calculate 3D point to line distance
 
static float pointToLineDistance (SbVec2f point, SbVec2f line1, SbVec2f line2)
 calculate 2D point to line distance
 
static Sign edgeIntersectWithPlane (const SbVec3f &v1, const SbVec3f &v2, const SbPlane &plane, SbVec3f &intersect)
 intersect given edge from v1 to v2 with given plane, returns sign and intersect point
 
- Static Public Member Functions inherited from SoInteractionProviderNode
static void initClass ()
 Initializes this class.
 
- Static Public Member Functions inherited from SoInteractionProvider
static void registerInteractionProviderNode (SoType type, GetProviderFunc func)
 Register a function to obtain a SoInteractionProvider from a SoNode.
 
static SoInteractionProvidergetInteractionProvider (SoNode *node)
 Get a SoInteractionProvider from a SoNode if registered, else NULL.
 

Public Attributes

SoSFMLBase inCSOList
 Input field for CSOList.
 
SoSFNode inExtensions
 Input field for extensions.
 
SoSFMLBase inVisualizationSettings
 Input of visualization settings.
 
SoSFMLBase inTransformationProvider
 Input of provided transformations.
 
SoSFString creatorExtensionId
 The unique id of an editor extension that receives the create events.
 
SoSFBool interactOnlyWithSelectedCSO
 Shall only a selected CSO be allow to be interacted with?
 
SoSFBool alwaysCreateNewCSOs
 Shall always be created and never selected and modified?
 
SoSFBool alwaysModifyExistingCSOs
 Shall always be selected and modified and never created?
 
SoSFBool keyCommandsEnabled
 Shall the key commands be enabled?
 
SoSFBool enableRemoveAll
 Shall the removeAll-key command be available?
 
SoSFBool renderLeftOverCSOsWithDefaultRenderer
 Shall the CSOs that were not rendered by an attached editor be rendered by a default renderer?
 
SoSFBool allowSelectionWithDefaultRenderer
 Shall the CSOs be selectable by the internal default renderer?
 
SoSFEnum renderCSOsOnImagesDependingOnCreationMode
 Defines on which images the CSOs should be rendered on, depending on where they have been created.
 
SoSFBool updateCSOIdUnderMouseCursor
 Shall the cso id under the mouse cursor be updated?
 
SoSFInt32 csoIdUnderMouseCursor
 The id of the CSO currently under the mouse (or -1 if no CSO is under the mouse).
 
SoSFBool isCreatingNewCSO
 Flag shows whether any editor is currently creating a new CSO.
 
SoSFBool isEditingExistingCSO
 Flag shows whether any editor is currently editing/modifying an existing CSO.
 
SoSFTrigger cancelGeneration
 Triggers the cancellation of the current generation.
 
SoSFBool updateImageStatisticsOnFinishInteraction
 Should the image statistics be updated for the currently active CSO on finishing an interaction (mouse up)?
 
- Public Attributes inherited from SoView2DExtension
SoSFColor color
 color that should be used for drawing
 
SoSFBool drawingOn
 flag if the extension should draw, needs to be checked inside of the draw() method
 
SoSFBool editingOn
 flag if the extension should edit objects on mouse events, needs to be checked inside of the evalEvent() method
 
SoSFBool maskValid
 flag if the event mask is valid.
 
SoSFFloat selectionTolerance
 the selection tolerance in pixels
 
SoSFBool wantsAllEvents
 flag if ALL events should be passed to evalEvent(), if disabled, events are only passed to evalEvent when the mouse mask gets valid
 
SoSFBool wantsKeyEvents
 flag if keyboard events should be passed to evalEvent()
 
SoSFBool wantsMouseWheelEvents
 flag if MouseWheel events should be passed to evalEvent()
 
SoSFBool setEventHandled
 Set event handled if it is indeed handled by this extension.
 
SoSFBool ignoreHandledEvents
 Ignore events, that have been handled by previous extensions.
 
SoSFEnum button1
 mouse mask for button1
 
SoSFEnum button2
 mouse mask for button2
 
SoSFEnum button3
 mouse mask for button3
 
SoSFEnum shift
 shift modifier for mouse mask
 
SoSFEnum control
 shift control for mouse mask
 
SoSFEnum alt
 shift alt for mouse mask
 
SoSFBool needsValidVoxel
 sets if a valid voxel must be hit to get evalEvent() calls
 
SoSFBool renderOnSlab
 defines if the extension should be rendered on all slab slices
 
SoSFBool createNewMode
 flag if extension is in createNewMode
 
SoSFTrigger createNewModeRequest
 
SoSFBool clipToSlice
 Flag to clip drawing to slice.
 
SoSFEnum cursorShape
 Set cursor shape if the mouse mask fits and mouseEvents are effectively sent to evalEvent for editing.
 
SoSFBool fixZOn
 DEPRECATED flag that indicates that the extension should fix the z value, only used in SoView2DRectangle.
 
- Public Attributes inherited from SoInteractionProviderNode
SoSFString instanceName
 Defines interface field to store the instance name.
 
SoSFString interactionProviderID
 This field overrides the instanceName as providerID if specified.
 

Protected Member Functions

 ~SoView2DCSOExtensibleEditor () override
 Destructor.
 
void startDrawing (View2DSliceList *slicelist) override
 Is called before drawing to initialize editors.
 
void draw (View2DSliceList *slicelist, View2DSlice *slice, int sliceZ) override
 Renders by calling the draw-method of all attached extensions.
 
bool evalEvent (SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) override
 Called by the SoView2D for each event that happens on the viewer.
 
void notifyEditorsOfMouseWheelEvent (SoMouseWheelEvent::Orientation orientation, int turn, View2DEvent *ec)
 
void editingOnChanged (SoField *) override
 Inherited from SoView2DExtension:
 
void buttonMaskChanged (SoField *) override
 called when one of the button/modifier fields is touched:
 
void extensionChanged (SoField *)
 New field change callbacks:
 
void interactOnlyWithSelectedCSOChanged (SoField *)
 
void inTransformationProviderChanged (SoField *)
 
void cancelGenerationChanged (SoField *)
 
void isCreatingOrEditingChanged (SoField *)
 
void doAction (SoAction *action) override
 Overloading to obtain and set the SoCSOTransform.
 
- Protected Member Functions inherited from SoView2DExtension
virtual void createNewModeRequestTriggered (SoField *)
 called when createNewModeRequest field ist touched:
 
 ~SoView2DExtension () override
 destructor
 
void GLRender (SoGLRenderAction *action) override
 Inventor actions.
 
void callback (SoCallbackAction *action) override
 
void handleEvent (SoHandleEventAction *action) override
 
void getMatrix (SoGetMatrixAction *action) override
 
void getBoundingBox (SoGetBoundingBoxAction *action) override
 
void pick (SoPickAction *action) override
 
void doAction (SoAction *action) override
 
- Protected Member Functions inherited from SoInteractionOwner
bool hasInteractions () const
 Returns whether there are any actions defined by this owner.
 
template<class T >
bool hasInteractionsOfType () const
 Same as above, but asking for a specific type of interaction.
 
void addPointingAction (SoPointingAction *)
 
void addCommandAction (SoCommandAction *)
 
void addOffsetAction (SoOffsetAction *)
 

Static Protected Member Functions

static void csoListNotificationCB (void *userData, int notificationFlag)
 Is called by CSOList notifications.
 

Protected Attributes

SoCSOTransform_csoTransform
 Global transformation for visualization.
 
- Protected Attributes inherited from SoView2DExtension
SoNodeSensor_nodeSensor
 node sensor that is used to notice field changes
 
float _rgbColor [4]
 Color of the object, update on each field change by _nodeSensor.
 
bool _wantsMouseOverUpdateEvents
 set this flag to receive mouse over events while the extension is active
 

Friends

class CSOCopyCommandAction
 
class CSOCutCommandAction
 
class CSOPasteCommandAction
 
class CSODeleteSeedPointCommandAction
 
class CSODeleteCSOCommandAction
 
class CSOUndoCommandAction
 
class CSORedoCommandAction
 
class CSORemoveAllCommandAction
 
bool SoCSOEditorTools::evaluateHitPoint (const ml::Vector3 &worldPosition, View2DSliceList *slicelist, ml::CSOList *csoList, const ml::CSOBoundingBox &slabBB, const std::string &subType, SoView2DCSOExtensibleEditor *editor, bool testSeedPoints, ml::CSO *&localHitCSO, ml::CSOSeedPoint *&localHitSeedPoint, ml::CSOPathPoints *&localHitPathPoints, float &distance)
 

Detailed Description

Definition at line 73 of file SoView2DCSOExtensibleEditor.h.

Member Enumeration Documentation

◆ CSORenderOnImagesDependingOnCreationModes

Modes to control the rendering of CSOs depending on the images they were created on.

Enumerator
ON_ALL_IMAGES 

Render CSOs on all images.

ONLY_ON_IMAGES_THEY_WERE_CREATED_ON 

Render CSOs on only image with the same imageInstanceSOP id that is stored in the CSO user data.

ONLY_ON_IMAGES_THEY_WERE_NOT_CREATED_ON 

Render CSOs only on images with a different imageInstaceSOP id.

ONLY_ON_IMAGES_THEY_CAN_BE_TRANSFORMED_TO 

Render CSOs only on images they can be transformed to.

Definition at line 204 of file SoView2DCSOExtensibleEditor.h.

Constructor & Destructor Documentation

◆ SoView2DCSOExtensibleEditor()

SoView2DCSOExtensibleEditor::SoView2DCSOExtensibleEditor ( )

Constructor.

◆ ~SoView2DCSOExtensibleEditor()

SoView2DCSOExtensibleEditor::~SoView2DCSOExtensibleEditor ( )
overrideprotected

Destructor.

Member Function Documentation

◆ buttonMaskChanged()

void SoView2DCSOExtensibleEditor::buttonMaskChanged ( SoField * )
overrideprotectedvirtual

called when one of the button/modifier fields is touched:

Reimplemented from SoView2DExtension.

◆ cancel()

void SoView2DCSOExtensibleEditor::cancel ( )

Cancels the current interaction.

◆ cancelGenerationChanged()

void SoView2DCSOExtensibleEditor::cancelGenerationChanged ( SoField * )
protected

◆ csoListNotificationCB()

static void SoView2DCSOExtensibleEditor::csoListNotificationCB ( void * userData,
int notificationFlag )
staticprotected

Is called by CSOList notifications.

◆ doAction()

void SoView2DCSOExtensibleEditor::doAction ( SoAction * action)
overrideprotected

Overloading to obtain and set the SoCSOTransform.

◆ draw()

void SoView2DCSOExtensibleEditor::draw ( View2DSliceList * slicelist,
View2DSlice * slice,
int sliceZ )
overrideprotectedvirtual

Renders by calling the draw-method of all attached extensions.

Reimplemented from SoView2DExtension.

◆ editingOnChanged()

void SoView2DCSOExtensibleEditor::editingOnChanged ( SoField * )
overrideprotectedvirtual

Inherited from SoView2DExtension:

Reimplemented from SoView2DExtension.

◆ evalEvent()

bool SoView2DCSOExtensibleEditor::evalEvent ( SoView2D * view2d,
View2DSliceList * slicelist,
View2DEvent * ec,
View2DEventPhase phase )
overrideprotectedvirtual

Called by the SoView2D for each event that happens on the viewer.

Implement this method if you want to handle events. If this method is called depends on the fields wantsAllEvents, wantsKeyEvents, wantsMouseWheelEvents and the mouse mask given by button1, button2, button3, shift, control, alt. When using the mouse mask (when wantsAllEvents is set to false), the View2DEventPhase indicates in which phase of the mouse mask you are in.

Reimplemented from SoView2DExtension.

◆ extensionChanged()

void SoView2DCSOExtensibleEditor::extensionChanged ( SoField * )
protected

New field change callbacks:

◆ fillCSOSliceInformation()

void SoView2DCSOExtensibleEditor::fillCSOSliceInformation ( const CSODrawCSOInfos & csoInfos,
const CSODrawView2DInfos & view2DInfos,
CSODrawSliceInformation & sliceInfo,
const ml::Matrix4 & worldToVoxelMatrix,
const CSOVoxelSlab & csoSlab )

Fills the relation of the given CSO to the current slice.

◆ getActiveEditor()

SoCSOEditorExtension * SoView2DCSOExtensibleEditor::getActiveEditor ( ) const

Returns the attached editor that is active for creating new CSOs (or NULL if there is not any).

◆ getCoordinateSystemReference() [1/4]

ml::CoordinateSystemReference SoView2DCSOExtensibleEditor::getCoordinateSystemReference ( const CSODrawView2DInfos & view2DInfos)

◆ getCoordinateSystemReference() [2/4]

ml::CoordinateSystemReference SoView2DCSOExtensibleEditor::getCoordinateSystemReference ( const SoPointerPosition & pos)

◆ getCoordinateSystemReference() [3/4]

ml::CoordinateSystemReference SoView2DCSOExtensibleEditor::getCoordinateSystemReference ( ml::CSO * cso)

Returns a coordinate system reference for the given object.

◆ getCoordinateSystemReference() [4/4]

ml::CoordinateSystemReference SoView2DCSOExtensibleEditor::getCoordinateSystemReference ( SoView2D * viewer)

◆ getDefaultCreatorString()

std::string SoView2DCSOExtensibleEditor::getDefaultCreatorString ( ) const
inline

Returns a default creator id string that indicates that the first found editor should create CSOs.

Definition at line 131 of file SoView2DCSOExtensibleEditor.h.

◆ getDefaultRenderer()

SoCSODefaultRenderer * SoView2DCSOExtensibleEditor::getDefaultRenderer ( )

Returns the default renderer.

◆ getExtensions()

void SoView2DCSOExtensibleEditor::getExtensions ( ExtensionList & extensions)

Collects attached extensions to the given list.

◆ getInputCSOList()

ml::CSOList * SoView2DCSOExtensibleEditor::getInputCSOList ( )

Returns a pointer to the input CSOList or NULL if nothing valid is attached.

◆ getInteractionModifier()

int SoView2DCSOExtensibleEditor::getInteractionModifier ( ) const
inline

Returns the interaction mode as determined by a pointing action.

Definition at line 154 of file SoView2DCSOExtensibleEditor.h.

◆ getRegistrationInformation()

ml::AbstractTransformationPtr SoView2DCSOExtensibleEditor::getRegistrationInformation ( const SoPointerPosition & pos,
ml::CSO * cso )

Returns a registration if it exists for the given CSO on the given image (as a SoPointerPosition), or NULL.

◆ getTransformation()

ml::AbstractTransformationPtr SoView2DCSOExtensibleEditor::getTransformation ( const ml::CoordinateSystemReference & from,
const ml::CoordinateSystemReference & to )

Returns a transformation if existing, NULL otherwise.

◆ getVisualizationSettings()

ml::CSOVisualizationSettings * SoView2DCSOExtensibleEditor::getVisualizationSettings ( )

Returns the pointer to a optionally attached CSOVisualizationSettings object.

◆ hasRegistrationInformation()

bool SoView2DCSOExtensibleEditor::hasRegistrationInformation ( const SoPointerPosition & pos,
ml::CSO * cso )

Returns whether a registration exists.

◆ hasTransformationProvider()

bool SoView2DCSOExtensibleEditor::hasTransformationProvider ( ) const
inline

Returns if the editor has a transformation provider.

Definition at line 183 of file SoView2DCSOExtensibleEditor.h.

◆ initClass()

static void SoView2DCSOExtensibleEditor::initClass ( )
static

Initialization of inventor stuff.

◆ interactOnlyWithSelectedCSOChanged()

void SoView2DCSOExtensibleEditor::interactOnlyWithSelectedCSOChanged ( SoField * )
protected

◆ inTransformationProviderChanged()

void SoView2DCSOExtensibleEditor::inTransformationProviderChanged ( SoField * )
protected

◆ isCreatingOrEditingChanged()

void SoView2DCSOExtensibleEditor::isCreatingOrEditingChanged ( SoField * )
protected

◆ isSameImage()

bool SoView2DCSOExtensibleEditor::isSameImage ( const ml::CoordinateSystemReference & from,
const ml::CoordinateSystemReference & to )

Returns whether the given coordinate references reference the same image.

◆ isSelectionAllowedWithDefaultRenderer()

bool SoView2DCSOExtensibleEditor::isSelectionAllowedWithDefaultRenderer ( ) const
inline

Returns whether a CSO can be selected by the internal default renderer.

Definition at line 217 of file SoView2DCSOExtensibleEditor.h.

◆ notifyEditorsOfMouseWheelEvent()

void SoView2DCSOExtensibleEditor::notifyEditorsOfMouseWheelEvent ( SoMouseWheelEvent::Orientation orientation,
int turn,
View2DEvent * ec )
protected

◆ pointerLeftWindow()

void SoView2DCSOExtensibleEditor::pointerLeftWindow ( )
overridevirtual

Is called when mouse pointer leaves the window.

Reimplemented from SoInteractionOwner.

◆ pointerPosition()

void SoView2DCSOExtensibleEditor::pointerPosition ( const SoPointerPosition & pos)
overridevirtual

Is called on moving the mouse, sets the CSO id under the cursor.

Reimplemented from SoInteractionOwner.

◆ resetLastActiveEditor()

void SoView2DCSOExtensibleEditor::resetLastActiveEditor ( )

Resets the active editor to the last active editor if it was set.

Use this after a modification editor had set the active editor (with storeLastEditor=true) and is now done.

◆ setActiveEditor()

void SoView2DCSOExtensibleEditor::setActiveEditor ( SoCSOEditorExtension * editor,
bool storeLastEditor = true )

Sets the active editor, use this only to temporarily set a modification editor.

The currently active editor is saved and can be reset by calling resetLastActiveEditor.

◆ setCreateActionTrigger()

void SoView2DCSOExtensibleEditor::setCreateActionTrigger ( const SoPointingAction::Trigger & trigger)

Sets the CSOCreateAction trigger.

This should be used by SoCSOEditorExtensions which define an additional CSOAbstractCreateAction when being activated.

◆ setCreateActionTriggerToDefault()

void SoView2DCSOExtensibleEditor::setCreateActionTriggerToDefault ( )

Sets the CSOCreateAction trigger to its default, according to the trigger fields.

This should be used by SoCSOEditorExtensions which define an additional CSOAbstractCreateAction when being deactivated.

◆ setCSOUnderTheMouseId()

void SoView2DCSOExtensibleEditor::setCSOUnderTheMouseId ( int id)

Sets the csoUnderTheMouseId field, only if the id changes.

◆ setInteractionModifier()

void SoView2DCSOExtensibleEditor::setInteractionModifier ( int mode)
inline

Sets the interaction mode as determined by a pointing action.

Definition at line 152 of file SoView2DCSOExtensibleEditor.h.

◆ shouldShowCSOAtAll()

bool SoView2DCSOExtensibleEditor::shouldShowCSOAtAll ( ml::CSO * cso)

Returns whether the given CSO should be rendered at all, that is whether its shows state is true and its eventual CSOGroup's show state is true.

◆ shouldShowCSOBeyondSlice()

bool SoView2DCSOExtensibleEditor::shouldShowCSOBeyondSlice ( const CSODrawSliceInformation & sliceInfo,
const CSODrawView2DInfos & view2DInfos,
ml::CSO * cso )

Returns whether the given CSO should be rendered beyond the current slice.

◆ shouldShowCSOForCurrentTimePoint()

bool SoView2DCSOExtensibleEditor::shouldShowCSOForCurrentTimePoint ( const CSODrawView2DInfos & view2DInfos,
ml::CSO * cso )

Returns whether the given CSO should be rendered for the current time point.

The decision depends on the visualization settings.

◆ shouldShowCSOOnImageWithId()

bool SoView2DCSOExtensibleEditor::shouldShowCSOOnImageWithId ( const CSODrawView2DInfos & view2DInfos,
ml::CSO * cso )

Returns whether the given CSO should be rendered on a particular image, identified by its DICOM SeriesInstanceUID.

◆ shouldShowCSORegardingParallelState()

bool SoView2DCSOExtensibleEditor::shouldShowCSORegardingParallelState ( const CSODrawSliceInformation & sliceInfo,
const CSODrawView2DInfos & view2DInfos,
ml::CSO * cso )

Returns whether the given CSO should be rendered regarding its parallel state.

◆ startDrawing()

void SoView2DCSOExtensibleEditor::startDrawing ( View2DSliceList * slicelist)
overrideprotectedvirtual

Is called before drawing to initialize editors.

Reimplemented from SoView2DExtension.

◆ startEditingCSO()

void SoView2DCSOExtensibleEditor::startEditingCSO ( const SoPointerPosition & pos,
ml::CSO * cso )

Sets the isEditingExistingCSO field to TRUE and stores the current viewer's name in the CSO's userData.

◆ stopEditingCSO()

void SoView2DCSOExtensibleEditor::stopEditingCSO ( )

Sets the isEditingExistingCSO field to FALSE.

◆ toggleCancelCommandIsActiveForModifications()

void SoView2DCSOExtensibleEditor::toggleCancelCommandIsActiveForModifications ( bool isActive)

Toggles the activation of the cancel command without any additional checks; to be used with care and for modification editors.

◆ transformCSO()

void SoView2DCSOExtensibleEditor::transformCSO ( ml::CSO * cso,
const ml::AbstractTransformationPtr & transformation )

Transforms the given CSO on base of registration information.

Note that the original coordinate information gets lost by transforming.

Friends And Related Symbol Documentation

◆ CSOCopyCommandAction

◆ CSOCutCommandAction

◆ CSODeleteCSOCommandAction

◆ CSODeleteSeedPointCommandAction

◆ CSOPasteCommandAction

◆ CSORedoCommandAction

◆ CSORemoveAllCommandAction

◆ CSOUndoCommandAction

◆ SoCSOEditorTools::evaluateHitPoint

bool SoCSOEditorTools::evaluateHitPoint ( const ml::Vector3 & worldPosition,
View2DSliceList * slicelist,
ml::CSOList * csoList,
const ml::CSOBoundingBox & slabBB,
const std::string & subType,
SoView2DCSOExtensibleEditor * editor,
bool testSeedPoints,
ml::CSO *& localHitCSO,
ml::CSOSeedPoint *& localHitSeedPoint,
ml::CSOPathPoints *& localHitPathPoints,
float & distance )
friend

Member Data Documentation

◆ _csoTransform

SoCSOTransform* SoView2DCSOExtensibleEditor::_csoTransform
protected

Global transformation for visualization.

Definition at line 262 of file SoView2DCSOExtensibleEditor.h.

◆ allowSelectionWithDefaultRenderer

SoSFBool SoView2DCSOExtensibleEditor::allowSelectionWithDefaultRenderer

Shall the CSOs be selectable by the internal default renderer?

Definition at line 107 of file SoView2DCSOExtensibleEditor.h.

◆ alwaysCreateNewCSOs

SoSFBool SoView2DCSOExtensibleEditor::alwaysCreateNewCSOs

Shall always be created and never selected and modified?

Definition at line 96 of file SoView2DCSOExtensibleEditor.h.

◆ alwaysModifyExistingCSOs

SoSFBool SoView2DCSOExtensibleEditor::alwaysModifyExistingCSOs

Shall always be selected and modified and never created?

Definition at line 98 of file SoView2DCSOExtensibleEditor.h.

◆ cancelGeneration

SoSFTrigger SoView2DCSOExtensibleEditor::cancelGeneration

Triggers the cancellation of the current generation.

Definition at line 120 of file SoView2DCSOExtensibleEditor.h.

◆ creatorExtensionId

SoSFString SoView2DCSOExtensibleEditor::creatorExtensionId

The unique id of an editor extension that receives the create events.

Definition at line 92 of file SoView2DCSOExtensibleEditor.h.

◆ csoIdUnderMouseCursor

SoSFInt32 SoView2DCSOExtensibleEditor::csoIdUnderMouseCursor

The id of the CSO currently under the mouse (or -1 if no CSO is under the mouse).

Definition at line 114 of file SoView2DCSOExtensibleEditor.h.

◆ enableRemoveAll

SoSFBool SoView2DCSOExtensibleEditor::enableRemoveAll

Shall the removeAll-key command be available?

Definition at line 102 of file SoView2DCSOExtensibleEditor.h.

◆ inCSOList

SoSFMLBase SoView2DCSOExtensibleEditor::inCSOList

Input field for CSOList.

Definition at line 83 of file SoView2DCSOExtensibleEditor.h.

◆ inExtensions

SoSFNode SoView2DCSOExtensibleEditor::inExtensions

Input field for extensions.

Definition at line 85 of file SoView2DCSOExtensibleEditor.h.

◆ interactOnlyWithSelectedCSO

SoSFBool SoView2DCSOExtensibleEditor::interactOnlyWithSelectedCSO

Shall only a selected CSO be allow to be interacted with?

Definition at line 94 of file SoView2DCSOExtensibleEditor.h.

◆ inTransformationProvider

SoSFMLBase SoView2DCSOExtensibleEditor::inTransformationProvider

Input of provided transformations.

Definition at line 89 of file SoView2DCSOExtensibleEditor.h.

◆ inVisualizationSettings

SoSFMLBase SoView2DCSOExtensibleEditor::inVisualizationSettings

Input of visualization settings.

Definition at line 87 of file SoView2DCSOExtensibleEditor.h.

◆ isCreatingNewCSO

SoSFBool SoView2DCSOExtensibleEditor::isCreatingNewCSO

Flag shows whether any editor is currently creating a new CSO.

Definition at line 116 of file SoView2DCSOExtensibleEditor.h.

◆ isEditingExistingCSO

SoSFBool SoView2DCSOExtensibleEditor::isEditingExistingCSO

Flag shows whether any editor is currently editing/modifying an existing CSO.

Definition at line 118 of file SoView2DCSOExtensibleEditor.h.

◆ keyCommandsEnabled

SoSFBool SoView2DCSOExtensibleEditor::keyCommandsEnabled

Shall the key commands be enabled?

Definition at line 100 of file SoView2DCSOExtensibleEditor.h.

◆ renderCSOsOnImagesDependingOnCreationMode

SoSFEnum SoView2DCSOExtensibleEditor::renderCSOsOnImagesDependingOnCreationMode

Defines on which images the CSOs should be rendered on, depending on where they have been created.

Definition at line 110 of file SoView2DCSOExtensibleEditor.h.

◆ renderLeftOverCSOsWithDefaultRenderer

SoSFBool SoView2DCSOExtensibleEditor::renderLeftOverCSOsWithDefaultRenderer

Shall the CSOs that were not rendered by an attached editor be rendered by a default renderer?

Definition at line 105 of file SoView2DCSOExtensibleEditor.h.

◆ updateCSOIdUnderMouseCursor

SoSFBool SoView2DCSOExtensibleEditor::updateCSOIdUnderMouseCursor

Shall the cso id under the mouse cursor be updated?

Definition at line 112 of file SoView2DCSOExtensibleEditor.h.

◆ updateImageStatisticsOnFinishInteraction

SoSFBool SoView2DCSOExtensibleEditor::updateImageStatisticsOnFinishInteraction

Should the image statistics be updated for the currently active CSO on finishing an interaction (mouse up)?

Definition at line 123 of file SoView2DCSOExtensibleEditor.h.


The documentation for this class was generated from the following file: