fsleyes.plugins.profiles.orthoannotateprofile
¶
This module provides the OrthoAnnotateProfile
class, an
interaction Profile
for OrthoPanel
views.
-
class
fsleyes.plugins.profiles.orthoannotateprofile.
OrthoAnnotateProfile
(viewPanel, overlayList, displayCtx)[source]¶ Bases:
fsleyes.profiles.orthoviewprofile.OrthoViewProfile
The
OrthoAnnotateProfile
class is aProfile
for theOrthoPanel
class, which allows the user to annotate the canvases of anOrthoPanel
with simple shapes and text.-
colour
= <MagicMock name='mock.Colour()' id='4022089016'>¶ Initial colour to give all annotations.
-
lineWidth
= <MagicMock name='mock.Int()' id='4022089304'>¶ Initial width to give line-based annotations.
-
fontSize
= <MagicMock name='mock.Int()' id='4022089232'>¶ Initial font size to give text annotations.
-
filled
= <MagicMock name='mock.Boolean()' id='4022089424'>¶ Whether ellipses/rectangles are filled in or not.
-
border
= <MagicMock name='mock.Boolean()' id='4022089472'>¶ Whether ellipses/rectangles are drawn with a border or not.
-
honourZLimits
= <MagicMock name='mock.Boolean()' id='4022089520'>¶ Whether annotations are drawn when outside their Z limits.
-
alpha
= <MagicMock name='mock.Percentage()' id='4022089568'>¶ Opacity.
-
static
tempModes
()[source]¶ Returns the temporary mode map for the
OrthoAnnotateProfile
, which controls the use of modifier keys to temporarily enter other interaction modes.
-
static
altHandlers
()[source]¶ Returns the alternate handlers map, which allows event handlers defined in one mode to be re-used whilst in another mode.
-
__init__
(viewPanel, overlayList, displayCtx)[source]¶ Create an
OrthoAnnotateProfile
.- Parameters
viewPanel – An
OrthoPanel
instance.overlayList – The
OverlayList
instance.displayCtx – The
DisplayContext
instance.
-
__initialSettings
(canvas, canvasPos)¶ Returns a dictionary containing some initial settings with which all new annotations are created.
-
__displaySize
(size, squared)¶ Display the given size (length or area) in the
FSLeyesFrame
status bar.- Parameters
size – Size to display
squared – If
True
, ^2 is shown after the size value (use if the size is an area).
-
_moveModeLeftMouseDown
(ev, canvas, mousePos, canvasPos)[source]¶ If the mouse lands on an annotation, save a reference to it so it can be moved on mouse drag.
-
_moveModeLeftMouseDrag
(ev, canvas, mousePos, canvasPos)[source]¶ Move the annotation that was clicked on.
-
_moveModeLeftMouseUp
(ev, canvas, mousePos, canvasPos)[source]¶ Clears the reference to the annotation that was being moved.
-
_lineModeLeftMouseDrag
(ev, canvas, mousePos, canvasPos)[source]¶ Adjust the line end point so it tracks the mouse location.
-
_lineModeLeftMouseUp
(ev, canvas, mousePos, canvasPos)[source]¶ Clear a reference to the newly created line. If the mouse hasn’t moved since mouse down, the line is deleted.
-
_arrowModeLeftMouseDrag
(ev, canvas, mousePos, canvasPos)[source]¶ Adjust the arrow end point so it tracks the mouse location.
-
_arrowModeLeftMouseUp
(ev, canvas, mousePos, canvasPos)[source]¶ Clear a reference to the newly created arrow. If the mouse hasn’t moved since mouse down, the arrow is deleted.
-
_pointModeLeftMouseDrag
(ev, canvas, mousePos, canvasPos)[source]¶ Changes the location of the point annotation to track the mouse drag location.
-
_pointModeLeftMouseUp
(ev, canvas, mousePos, canvasPos)[source]¶ Clear a reference to the newly created point annotation.
-
__module__
= 'fsleyes.plugins.profiles.orthoannotateprofile'¶
-
_textModeLeftMouseUp
(ev, canvas, mousePos, canvasPos)[source]¶ Show a dialog prompting the user for some text, then creates a new text annotation.
-
_rectModeLeftMouseDrag
(ev, canvas, mousePos, canvasPos)[source]¶ Adjust the size of the rectangle with the mouse drag.
-
_rectModeLeftMouseUp
(ev, canvas, mousePos, canvasPos)[source]¶ Clear the reference to the new rectangle annotation. If the rectangle has no area (the user clicked without dragging), the rectangle is deleted.
-
_ellipseModeLeftMouseDown
(ev, canvas, mousePos, canvasPos)[source]¶ Create a new ellipse annotation.
-