fsleyes.controls.orthoedittoolbar
¶
This module provides the OrthoEditToolBar
, a
ControlToolBar
which displays controls for editing Image
instances in an OrthoPanel
.
-
class
fsleyes.controls.orthoedittoolbar.
OrthoEditToolBar
(parent, overlayList, displayCtx, frame, ortho)¶ Bases:
fsleyes.controls.controlpanel.ControlToolBar
The
OrthoEditToolBar
is aControlToolBar
which displays controls for editingImage
instances in anOrthoPanel
.An
OrthoEditToolBar
looks something like this:The
OrthoEditToolBar
exposes properties and actions which are defined on theOrthoEditProfile
class, and allows the user to:- Change the
OrthoPanel
profile betweenview
andedit
mode (see theViewPanel.profile
property). When inview
mode, all of the other controls are hidden. - Undo/redo changes to the selection and to
Image
instances. - Clear and fill the current selection.
- Switch between a 2D and 3D selection cursor.
- Change the selection cursor size.
- Create a new mask/ROI
Image
from the current selection. - Switch between regular select mode, and select by intensity mode, and adjust the select by intensity mode settings.
All of the controls shown on an
OrthoEditToolBar
instance are defined in the_TOOLBAR_SPECS
dictionary.-
selint
= <MagicMock name='mock.Boolean()' id='140655056157552'>¶ This property allows the user to change the
OrthoEditProfile
betweensel
mode, andselint
mode.
-
__init__
(parent, overlayList, displayCtx, frame, ortho)¶ Create an
OrthoEditToolBar
.Parameters: - parent – The
wx
parent object. - overlayList – The
OverlayList
instance. - displayCtx – The
DisplayContext
instance. - frame – The
FSLeyesFrame
instance. - ortho – The
OrthoPanel
instance.
- parent – The
-
destroy
()¶ Must be called when this
OrthoEditToolBar
is no longer needed. Removes property listeners, and calls theControlToolBar.destroy()
method.
-
static
supportedViews
()¶ Overrides
ControlMixin.supportedViews()
. TheOrthoEditToolBar
is only intended to be added toOrthoPanel
views.
-
_OrthoEditToolBar__profileChanged
(*a)¶ Called when the
ViewPanel.profile
property of theOrthoPanel
changes. Shows/hides edit controls accordingly.
-
__module__
= 'fsleyes.controls.orthoedittoolbar'¶
- Change the
-
fsleyes.controls.orthoedittoolbar.
_LABELS
= {'fillValue': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'intensityThres': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'searchRadius': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'selectionCursorColour': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'selectionOverlayColour': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'selectionSize': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'targetImage': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>}¶ This dictionary contains labels for some
OrthoEditToolBar
controls. It is referenced in the_TOOLBAR_SPECS
dictionary.
-
fsleyes.controls.orthoedittoolbar.
_ICONS
= {'drawMode': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/drawModeHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/drawMode24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selectModeHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selectMode24.png'], 'limitToRadius': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/radiusHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/radius24.png'], 'localFill': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/localsearchHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/localsearch24.png'], 'mode': {'desel': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/eraserHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/eraser24.png'], 'fill': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/bucketHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/bucket24.png'], 'nav': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/addHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/add24.png'], 'sel': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/pencilHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/pencil24.png'], 'selint': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selectByIntensityHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selectByIntensity24.png']}, 'selectionIs3D': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selection3DHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selection3D24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selection2DHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selection2D24.png'], 'selint': ['/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selectByIntensityHighlight24.png', '/builddir/build/BUILD/fsleyes-0.27.3/apidoc/../fsleyes/../assets/icons/selectByIntensity24.png']}¶ This dictionary contains icons for some
OrthoEditToolBar
controls. It is referenced in the_TOOLBAR_SPECS
dictionary.
-
fsleyes.controls.orthoedittoolbar.
_TOOLTIPS
= {'drawMode': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'fillValue': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'intensityThres': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'limitToRadius': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'localFill': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'mode': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'searchRadius': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'selectionIs3D': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'selectionSize': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>, 'targetImage': <MagicMock name='mock.TypeDict().__getitem__()' id='140655050372992'>}¶ This dictionary contains tooltips for some
OrthoEditToolBar
controls. It is referenced in the_TOOLBAR_SPECS
dictionary.
-
fsleyes.controls.orthoedittoolbar.
_targetImageName
(image)¶
-
fsleyes.controls.orthoedittoolbar.
_TOOLBAR_SPECS
= [<MagicMock name='mock.Widget()' id='140655050490208'>, 'div', <MagicMock name='mock.Widget()' id='140655050490208'>, 'div', <MagicMock name='mock.Widget()' id='140655050490208'>, <MagicMock name='mock.Widget()' id='140655050490208'>, <MagicMock name='mock.Widget()' id='140655050490208'>, [<MagicMock name='mock.Widget()' id='140655050490208'>, <MagicMock name='mock.Widget()' id='140655050490208'>], [<MagicMock name='mock.Widget()' id='140655050490208'>, <MagicMock name='mock.Widget()' id='140655050490208'>], <MagicMock name='mock.Widget()' id='140655050490208'>]¶ This list contains specifications for all of the tools shown in an
OrthoEditToolBar
, in the order that they are shown.Some specs are grouped together into sub-lists - these will be laid out vertically on the toolbar.