MeVisLab Toolbox Reference
SoCSOArrowEditor.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2012, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13
15
16#pragma once
17
21
23
26{
27 SO_NODE_HEADER(SoCSOArrowEditor);
28
29public:
30
33
35 static void initClass();
36
37
38private:
40 void draw(const CSODrawCSOInfos& csoInfos, const CSODrawView2DInfos& view2DInfos, const CSODrawSliceInformation& drawSliceInfo, SoView2DCSOExtensibleEditor* editor) override;
41
42 void createStartPressAt(const SoPointerPosition& pos) override;
43 void createDragMoveTo(const SoPointerPosition& pos) override;
44 bool createEndPress(int clickCount) override;
45 void pointerPositionIfAllowedAt(const SoPointerPosition& ) override {}
46
47 void selectAndMoveStartPressAt(const SoPointerPosition& pos) override;
48 void selectAndMoveDragMoveTo(const SoPointerPosition& pos) override;
49 SoPointingAction* selectAndMoveEndPress(int clickCount) override;
50
51 void cancel() override;
52
55 bool evaluateHitPoint(const ml::Vector3& worldPosition, View2DSliceList* slicelist, ml::CSOList* csoList,
58 ml::CSOPathPoints*& localHitPathPoints, float& distance) override;
59
60 void renderArrow(const CSODrawCSOInfos& csoInfos, const CSODrawView2DInfos& view2DInfos, const CSODrawSliceInformation& );
61
62 void renderArrowHeadOutline(int iDeviceX, int iDeviceY);
63 void renderArrowHead(int iDeviceX, int iDeviceY);
64
66 ml::CSOVisualizationSettings* vSettings, ml::CSO* cso, bool isMouseOver);
67
69 SoSFFloat drawOffsetInMillimeter;
71 SoSFMLBase inArrowHeadSettings;
72
73 bool _wasCanceled;
74
75 SbVec3f _startPosition;
76};
77
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition SoCSOSystem.h:21
Extension for rendering, generating, and modifying an arrow icon CSO.
static void initClass()
init class in inventor runtime
SoCSOArrowEditor()
Standard constructor.
Base class for extensions that extend the editor with interaction and rendering for specific CSO type...
virtual void draw(const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &sliceInfo, SoView2DCSOExtensibleEditor *editor)
Main routine for drawing a CSO.
virtual SoPointingAction * selectAndMoveEndPress(int clickCount)=0
virtual void createDragMoveTo(const SoPointerPosition &pos)=0
virtual void selectAndMoveStartPressAt(const SoPointerPosition &pos)=0
virtual void cancel()
Cancels an action like generating a CSO. Depends on concrete editor.
virtual void createStartPressAt(const SoPointerPosition &pos)=0
virtual bool evaluateHitPoint(const ml::Vector3 &worldPosition, View2DSliceList *slicelist, ml::CSOList *csoList, const ml::CSOBoundingBox &slabBB, SoView2DCSOExtensibleEditor *editor, ml::CSO *&localHitCSO, ml::CSOSeedPoint *&localHitSeedPoint, ml::CSOPathPoints *&localHitPathPoints, float &distance)
Returns whether the given world position is within the selection distance set in the editor and fills...
virtual bool createEndPress(int clickCount)=0
virtual void selectAndMoveDragMoveTo(const SoPointerPosition &pos)=0
virtual void pointerPositionIfAllowedAt(const SoPointerPosition &pos)=0
Sets seed points while moving the mouse – but not while dragging.
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
The SoSFMLBase field is the interface used by Inventor Nodes to output ML Base objects to the outside...
Definition SoSFMLBase.h:45
a list that holds all View2DSlice objects (lazily created) of a SoView2D
The CSOBoundingBox defines an axis parallel bounding box with double precision.
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition CSOList.h:61
The CSOPathPoints is a list of world coordinates which are interpolated by a certain interpolation sc...
The CSOSeedPoint can be interactively set and modified and is the framework for contours.
The CSO represents a contour segmentation object.
Definition CSO.h:44
Target mlrange_cast(Source arg)
Generic version of checked ML casts.