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, ortho)[source]¶
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='139907488986064'>¶
This property allows the user to change the
OrthoEditProfile
betweensel
mode, andselint
mode.
- static supportedViews()[source]¶
Overrides
ControlMixin.supportedViews()
. TheOrthoEditToolBar
is only intended to be added toOrthoPanel
views.
- static profileCls()[source]¶
The
OrthoEditToolBar
is intended to be activated with theOrthoEditProfile
.
- static ignoreControl()[source]¶
The
OrthoEditToolBar
is not intended to be explicitly added by the user - it is added viaOrthoPanel.toggleEditMode()
. Overriding this method tells theFSLeyesFrame
that it should not be added to the ortho panel settings menu.
- __init__(parent, overlayList, displayCtx, ortho)[source]¶
Create an
OrthoEditToolBar
.- Parameters
parent – The
wx
parent object.overlayList – The
OverlayList
instance.displayCtx – The
DisplayContext
instance.ortho – The
OrthoPanel
instance.
- destroy()[source]¶
Must be called when this
OrthoEditToolBar
is no longer needed. Removes property listeners, and calls theControlToolBar.destroy()
method.
- __createTools()¶
- __annotations__ = {}¶
- __module__ = 'fsleyes.controls.orthoedittoolbar'¶
- fsleyes.controls.orthoedittoolbar._LABELS = {'fillValue': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'intensityThres': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'searchRadius': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'selectionCursorColour': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'selectionOverlayColour': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'selectionSize': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'targetImage': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>}¶
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-1.1.0/fsleyes/assets/icons/drawModeHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/drawMode24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selectModeHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selectMode24.png'], 'limitToRadius': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/radiusHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/radius24.png'], 'localFill': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/localsearchHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/localsearch24.png'], 'mode': {'desel': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/eraserHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/eraser24.png'], 'fill': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/bucketHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/bucket24.png'], 'nav': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/addHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/add24.png'], 'sel': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/pencilHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/pencil24.png'], 'selint': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selectByIntensityHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selectByIntensity24.png']}, 'selectionIs3D': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selection3DHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selection3D24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selection2DHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selection2D24.png'], 'selint': ['/builddir/build/BUILD/fsleyes-1.1.0/fsleyes/assets/icons/selectByIntensityHighlight24.png', '/builddir/build/BUILD/fsleyes-1.1.0/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='139907484433952'>, 'fillValue': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'intensityThres': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'limitToRadius': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'localFill': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'mode': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'searchRadius': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'selectionIs3D': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'selectionSize': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>, 'targetImage': <MagicMock name='mock.TypeDict().__getitem__()' id='139907484433952'>}¶
This dictionary contains tooltips for some
OrthoEditToolBar
controls. It is referenced in the_TOOLBAR_SPECS
dictionary.
- fsleyes.controls.orthoedittoolbar._TOOLBAR_SPECS = [<MagicMock name='mock.Widget()' id='139907481281264'>, 'div', <MagicMock name='mock.Widget()' id='139907481281264'>, 'div', <MagicMock name='mock.Widget()' id='139907481281264'>, <MagicMock name='mock.Widget()' id='139907481281264'>, <MagicMock name='mock.Widget()' id='139907481281264'>, [<MagicMock name='mock.Widget()' id='139907481281264'>, <MagicMock name='mock.Widget()' id='139907481281264'>], [<MagicMock name='mock.Widget()' id='139907481281264'>, <MagicMock name='mock.Widget()' id='139907481281264'>], <MagicMock name='mock.Widget()' id='139907481281264'>]¶
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.