Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
d76f7418
Commit
d76f7418
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Tooltips added to OverlayDisplayToolBar
parent
fff73ac2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/fsleyes/controls/overlaydisplaytoolbar.py
+121
-37
121 additions, 37 deletions
fsl/fsleyes/controls/overlaydisplaytoolbar.py
fsl/fsleyes/tooltips.py
+5
-0
5 additions, 0 deletions
fsl/fsleyes/tooltips.py
with
126 additions
and
37 deletions
fsl/fsleyes/controls/overlaydisplaytoolbar.py
+
121
−
37
View file @
d76f7418
...
@@ -15,51 +15,115 @@ import wx
...
@@ -15,51 +15,115 @@ import wx
import
props
import
props
import
fsl.fsleyes.toolbar
as
fsltoolbar
import
fsl.fsleyes.toolbar
as
fsltoolbar
import
fsl.fsleyes.icons
as
icons
import
fsl.fsleyes.icons
as
icons
import
fsl.fsleyes.actions
as
actions
import
fsl.fsleyes.tooltips
as
fsltooltips
import
fsl.utils.typedict
as
td
import
fsl.fsleyes.actions
as
actions
import
fsl.data.strings
as
strings
import
fsl.utils.typedict
as
td
import
overlaydisplaypanel
as
overlaydisplay
import
fsl.data.strings
as
strings
import
overlaydisplaypanel
as
overlaydisplay
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
_TOOLTIPS
=
td
.
TypeDict
({
'
Display.name
'
:
fsltooltips
.
properties
[
'
Display.name
'
],
'
Display.overlayType
'
:
fsltooltips
.
properties
[
'
Display.overlayType
'
],
'
Display.alpha
'
:
fsltooltips
.
properties
[
'
Display.alpha
'
],
'
Display.brightness
'
:
fsltooltips
.
properties
[
'
Display.brightness
'
],
'
Display.contrast
'
:
fsltooltips
.
properties
[
'
Display.contrast
'
],
'
VolumeOpts.displayRange
'
:
fsltooltips
.
properties
[
'
VolumeOpts.
'
'
displayRange
'
],
'
VolumeOpts.resetDisplayRange
'
:
fsltooltips
.
actions
[
'
VolumeOpts.reset
'
'
DisplayRange
'
],
'
VolumeOpts.cmap
'
:
fsltooltips
.
properties
[
'
VolumeOpts.cmap
'
],
'
MaskOpts.threshold
'
:
fsltooltips
.
properties
[
'
MaskOpts.threshold
'
],
'
MaskOpts.colour
'
:
fsltooltips
.
properties
[
'
MaskOpts.colour
'
],
'
LabelOpts.lut
'
:
fsltooltips
.
properties
[
'
LabelOpts.lut
'
],
'
LabelOpts.outline
'
:
fsltooltips
.
properties
[
'
LabelOpts.outline
'
],
'
LabelOpts.outlineWidth
'
:
fsltooltips
.
properties
[
'
LabelOpts.
'
'
outlineWidth
'
],
'
RGBVectorOpts.modulate
'
:
fsltooltips
.
properties
[
'
VectorOpts.
'
'
modulate
'
],
'
RGBVectorOpts.modThreshold
'
:
fsltooltips
.
properties
[
'
VectorOpts.
'
'
modThreshold
'
],
'
LineVectorOpts.modulate
'
:
fsltooltips
.
properties
[
'
VectorOpts.
'
'
modulate
'
],
'
LineVectorOpts.modThreshold
'
:
fsltooltips
.
properties
[
'
VectorOpts.
'
'
modThreshold
'
],
'
LineVectorOpts.lineWidth
'
:
fsltooltips
.
properties
[
'
LineVectorOpts.
'
'
lineWidth
'
],
'
ModelOpts.colour
'
:
fsltooltips
.
properties
[
'
ModelOpts.colour
'
],
'
ModelOpts.outline
'
:
fsltooltips
.
properties
[
'
ModelOpts.outline
'
],
'
ModelOpts.outlineWidth
'
:
fsltooltips
.
properties
[
'
ModelOpts.
'
'
outlineWidth
'
],
})
_TOOLBAR_PROPS
=
td
.
TypeDict
({
_TOOLBAR_PROPS
=
td
.
TypeDict
({
'
Display
'
:
{
'
Display
'
:
{
'
name
'
:
props
.
Widget
(
'
name
'
),
'
name
'
:
props
.
Widget
(
'
overlayType
'
:
props
.
Widget
(
'
overlayType
'
),
'
name
'
,
'
alpha
'
:
props
.
Widget
(
'
alpha
'
,
tooltip
=
_TOOLTIPS
[
'
Display.name
'
]),
spin
=
False
,
'
overlayType
'
:
props
.
Widget
(
showLimits
=
False
),
'
overlayType
'
,
'
brightness
'
:
props
.
Widget
(
'
brightness
'
,
tooltip
=
_TOOLTIPS
[
'
Display.overlayType
'
]),
spin
=
False
,
'
alpha
'
:
props
.
Widget
(
showLimits
=
False
),
'
alpha
'
,
'
contrast
'
:
props
.
Widget
(
'
contrast
'
,
spin
=
False
,
spin
=
False
,
showLimits
=
False
,
showLimits
=
False
)},
tooltip
=
_TOOLTIPS
[
'
Display.alpha
'
]),
'
brightness
'
:
props
.
Widget
(
'
brightness
'
,
spin
=
False
,
showLimits
=
False
,
tooltip
=
_TOOLTIPS
[
'
Display.brightness
'
]),
'
contrast
'
:
props
.
Widget
(
'
contrast
'
,
spin
=
False
,
showLimits
=
False
,
tooltip
=
_TOOLTIPS
[
'
Display.contrast
'
])},
'
VolumeOpts
'
:
{
'
VolumeOpts
'
:
{
'
displayRange
'
:
props
.
Widget
(
'
displayRange
'
,
'
displayRange
'
:
props
.
Widget
(
slider
=
False
,
'
displayRange
'
,
showLimits
=
False
),
slider
=
False
,
showLimits
=
False
,
tooltip
=
_TOOLTIPS
[
'
VolumeOpts.displayRange
'
]),
'
resetDisplayRange
'
:
actions
.
ActionButton
(
'
resetDisplayRange
'
:
actions
.
ActionButton
(
'
resetDisplayRange
'
,
'
resetDisplayRange
'
,
icon
=
icons
.
findImageFile
(
'
verticalReset24
'
)),
icon
=
icons
.
findImageFile
(
'
verticalReset24
'
),
'
cmap
'
:
props
.
Widget
(
'
cmap
'
)},
tooltip
=
_TOOLTIPS
[
'
VolumeOpts.resetDisplayRange
'
]),
'
cmap
'
:
props
.
Widget
(
'
cmap
'
,
tooltip
=
_TOOLTIPS
[
'
VolumeOpts.cmap
'
])},
'
MaskOpts
'
:
{
'
MaskOpts
'
:
{
'
threshold
'
:
props
.
Widget
(
'
threshold
'
,
showLimits
=
False
,
spin
=
False
),
'
threshold
'
:
props
.
Widget
(
'
colour
'
:
props
.
Widget
(
'
colour
'
,
size
=
(
24
,
24
))},
'
threshold
'
,
showLimits
=
False
,
spin
=
False
,
tooltip
=
_TOOLTIPS
[
'
MaskOpts.threshold
'
]),
'
colour
'
:
props
.
Widget
(
'
colour
'
,
size
=
(
24
,
24
),
tooltip
=
_TOOLTIPS
[
'
MaskOpts.colour
'
])},
'
LabelOpts
'
:
{
'
LabelOpts
'
:
{
'
lut
'
:
props
.
Widget
(
'
lut
'
),
'
lut
'
:
props
.
Widget
(
'
lut
'
,
tooltip
=
_TOOLTIPS
[
'
LabelOpts.lut
'
]),
'
outline
'
:
props
.
Widget
(
'
outline
'
:
props
.
Widget
(
'
outline
'
,
'
outline
'
,
tooltip
=
_TOOLTIPS
[
'
LabelOpts.outline
'
],
icon
=
[
icons
.
findImageFile
(
'
outline24
'
),
icon
=
[
icons
.
findImageFile
(
'
outline24
'
),
icons
.
findImageFile
(
'
filled24
'
)],
icons
.
findImageFile
(
'
filled24
'
)],
toggle
=
True
,
toggle
=
True
,
...
@@ -68,29 +132,46 @@ _TOOLBAR_PROPS = td.TypeDict({
...
@@ -68,29 +132,46 @@ _TOOLBAR_PROPS = td.TypeDict({
'
outlineWidth
'
:
props
.
Widget
(
'
outlineWidth
'
:
props
.
Widget
(
'
outlineWidth
'
,
'
outlineWidth
'
,
tooltip
=
_TOOLTIPS
[
'
LabelOpts.outlineWidth
'
],
enabledWhen
=
lambda
i
,
sw
:
not
sw
,
enabledWhen
=
lambda
i
,
sw
:
not
sw
,
dependencies
=
[(
lambda
o
:
o
.
display
,
'
softwareMode
'
)],
dependencies
=
[(
lambda
o
:
o
.
display
,
'
softwareMode
'
)],
showLimits
=
False
,
showLimits
=
False
,
spin
=
False
)},
spin
=
False
)},
'
RGBVectorOpts
'
:
{
'
RGBVectorOpts
'
:
{
'
modulate
'
:
props
.
Widget
(
'
modulate
'
),
'
modulate
'
:
props
.
Widget
(
'
modThreshold
'
:
props
.
Widget
(
'
modThreshold
'
,
'
modulate
'
,
showLimits
=
False
,
tooltip
=
_TOOLTIPS
[
'
RGBVectorOpts.modulate
'
]),
spin
=
False
)},
'
modThreshold
'
:
props
.
Widget
(
'
modThreshold
'
,
showLimits
=
False
,
spin
=
False
,
tooltip
=
_TOOLTIPS
[
'
RGBVectorOpts.modThreshold
'
])},
'
LineVectorOpts
'
:
{
'
LineVectorOpts
'
:
{
'
modulate
'
:
props
.
Widget
(
'
modulate
'
),
'
modulate
'
:
props
.
Widget
(
'
modThreshold
'
:
props
.
Widget
(
'
modThreshold
'
,
'
modulate
'
,
showLimits
=
False
,
tooltip
=
_TOOLTIPS
[
'
LineVectorOpts.modulate
'
]),
spin
=
False
),
'
modThreshold
'
:
props
.
Widget
(
'
lineWidth
'
:
props
.
Widget
(
'
lineWidth
'
,
showLimits
=
False
,
spin
=
False
),
'
modThreshold
'
,
showLimits
=
False
,
spin
=
False
,
tooltip
=
_TOOLTIPS
[
'
LineVectorOpts.modThreshold
'
]),
'
lineWidth
'
:
props
.
Widget
(
'
lineWidth
'
,
showLimits
=
False
,
spin
=
False
,
tooltip
=
_TOOLTIPS
[
'
LineVectorOpts.lineWidth
'
]),
},
},
'
ModelOpts
'
:
{
'
ModelOpts
'
:
{
'
colour
'
:
props
.
Widget
(
'
colour
'
,
size
=
(
24
,
24
)),
'
colour
'
:
props
.
Widget
(
'
colour
'
,
size
=
(
24
,
24
),
tooltip
=
_TOOLTIPS
[
'
ModelOpts.colour
'
]),
'
outline
'
:
props
.
Widget
(
'
outline
'
:
props
.
Widget
(
'
outline
'
,
'
outline
'
,
tooltip
=
_TOOLTIPS
[
'
ModelOpts.outline
'
],
icon
=
[
icons
.
findImageFile
(
'
outline24
'
),
icon
=
[
icons
.
findImageFile
(
'
outline24
'
),
icons
.
findImageFile
(
'
filled24
'
)],
icons
.
findImageFile
(
'
filled24
'
)],
toggle
=
True
),
toggle
=
True
),
...
@@ -98,6 +179,7 @@ _TOOLBAR_PROPS = td.TypeDict({
...
@@ -98,6 +179,7 @@ _TOOLBAR_PROPS = td.TypeDict({
'
outlineWidth
'
,
'
outlineWidth
'
,
showLimits
=
False
,
showLimits
=
False
,
spin
=
False
,
spin
=
False
,
tooltip
=
_TOOLTIPS
[
'
ModelOpts.outlineWidth
'
],
enabledWhen
=
lambda
i
:
i
.
outline
)}
enabledWhen
=
lambda
i
:
i
.
outline
)}
})
})
...
@@ -392,7 +474,9 @@ class OverlayDisplayToolBar(fsltoolbar.FSLEyesToolBar):
...
@@ -392,7 +474,9 @@ class OverlayDisplayToolBar(fsltoolbar.FSLEyesToolBar):
self
,
self
,
self
,
self
,
view
=
actions
.
ActionButton
(
view
=
actions
.
ActionButton
(
'
more
'
,
icon
=
icons
.
findImageFile
(
'
gear24
'
)))
'
more
'
,
icon
=
icons
.
findImageFile
(
'
gear24
'
),
tooltip
=
fsltooltips
.
actions
[
self
,
'
more
'
]))
tools
.
insert
(
0
,
more
)
tools
.
insert
(
0
,
more
)
...
...
This diff is collapsed.
Click to expand it.
fsl/fsleyes/tooltips.py
+
5
−
0
View file @
d76f7418
...
@@ -360,6 +360,11 @@ actions = TypeDict({
...
@@ -360,6 +360,11 @@ actions = TypeDict({
'
from the current selection
'
,
'
from the current selection
'
,
'
OrthoEditProfile.createROIFromSelection
'
:
'
Create a new ROI overlay
'
'
OrthoEditProfile.createROIFromSelection
'
:
'
Create a new ROI overlay
'
'
from the current selection
'
,
'
from the current selection
'
,
'
VolumeOpts.resetDisplayRange
'
:
'
Reset the display range
'
'
to the data range.
'
,
'
OverlayDisplayToolBar.more
'
:
'
Show more overlay display settings.
'
,
})
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment