Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD 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
Evan Edmond
fslpy
Commits
4c717e5d
Commit
4c717e5d
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Ortho/lightbox toolbar tooltips.
parent
5155eb5c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
fsl/fsleyes/controls/lightboxtoolbar.py
+47
-28
47 additions, 28 deletions
fsl/fsleyes/controls/lightboxtoolbar.py
fsl/fsleyes/controls/orthotoolbar.py
+61
-28
61 additions, 28 deletions
fsl/fsleyes/controls/orthotoolbar.py
fsl/fsleyes/tooltips.py
+8
-3
8 additions, 3 deletions
fsl/fsleyes/tooltips.py
with
116 additions
and
59 deletions
fsl/fsleyes/controls/lightboxtoolbar.py
+
47
−
28
View file @
4c717e5d
...
...
@@ -10,10 +10,11 @@ import wx
import
props
import
fsl.fsleyes.toolbar
as
fsltoolbar
import
fsl.fsleyes.actions
as
actions
import
fsl.fsleyes.icons
as
icons
import
fsl.data.strings
as
strings
import
fsl.fsleyes.toolbar
as
fsltoolbar
import
fsl.fsleyes.actions
as
actions
import
fsl.fsleyes.icons
as
fslicons
import
fsl.fsleyes.tooltips
as
fsltooltips
import
fsl.data.strings
as
strings
class
LightBoxToolBar
(
fsltoolbar
.
FSLEyesToolBar
):
...
...
@@ -26,46 +27,64 @@ class LightBoxToolBar(fsltoolbar.FSLEyesToolBar):
self
,
parent
,
overlayList
,
displayCtx
,
24
,
actionz
)
self
.
lightBoxPanel
=
lb
icns
=
{
'
screenshot
'
:
icons
.
findImageFile
(
'
camera24
'
),
'
more
'
:
icons
.
findImageFile
(
'
gear24
'
),
lbOpts
=
lb
.
getSceneOptions
()
icons
=
{
'
screenshot
'
:
fslicons
.
findImageFile
(
'
camera24
'
),
'
more
'
:
fslicons
.
findImageFile
(
'
gear24
'
),
'
zax
'
:
{
0
:
icons
.
findImageFile
(
'
sagittalSlice24
'
),
1
:
icons
.
findImageFile
(
'
coronalSlice24
'
),
2
:
icons
.
findImageFile
(
'
axialSlice24
'
),
0
:
fsl
icons
.
findImageFile
(
'
sagittalSlice24
'
),
1
:
fsl
icons
.
findImageFile
(
'
coronalSlice24
'
),
2
:
fsl
icons
.
findImageFile
(
'
axialSlice24
'
),
}
}
sceneOpts
=
lb
.
getSceneOptions
()
tooltips
=
{
'
more
'
:
fsltooltips
.
actions
[
self
,
'
more
'
],
'
screenshot
'
:
fsltooltips
.
actions
[
lb
,
'
screenshot
'
],
'
zax
'
:
fsltooltips
.
properties
[
lbOpts
,
'
zax
'
],
'
sliceSpacing
'
:
fsltooltips
.
properties
[
lbOpts
,
'
sliceSpacing
'
],
'
zrange
'
:
fsltooltips
.
properties
[
lbOpts
,
'
zrange
'
],
'
zoom
'
:
fsltooltips
.
properties
[
lbOpts
,
'
zoom
'
],
}
specs
=
{
'
more
'
:
actions
.
ActionButton
(
'
more
'
,
icon
=
icns
[
'
more
'
]),
'
screenshot
'
:
actions
.
ActionButton
(
'
screenshot
'
,
icon
=
icns
[
'
screenshot
'
]),
'
more
'
:
actions
.
ActionButton
(
'
more
'
,
icon
=
icons
[
'
more
'
],
tooltip
=
tooltips
[
'
more
'
]),
'
screenshot
'
:
actions
.
ActionButton
(
'
screenshot
'
,
icon
=
icons
[
'
screenshot
'
],
tooltip
=
tooltips
[
'
screenshot
'
]),
'
zax
'
:
props
.
Widget
(
'
zax
'
,
icons
=
icns
[
'
zax
'
]),
icons
=
icons
[
'
zax
'
],
tooltip
=
tooltips
[
'
zax
'
]),
'
sliceSpacing
'
:
props
.
Widget
(
'
sliceSpacing
'
,
spin
=
False
,
showLimits
=
False
),
showLimits
=
False
,
tooltip
=
tooltips
[
'
sliceSpacing
'
]),
'
zrange
'
:
props
.
Widget
(
'
zrange
'
,
spin
=
False
,
showLimits
=
False
,
labels
=
[
strings
.
choices
[
sceneOpts
,
'
zrange
'
,
'
min
'
],
strings
.
choices
[
sceneOpts
,
'
zrange
'
,
'
max
'
]]),
tooltip
=
tooltips
[
'
zrange
'
],
labels
=
[
strings
.
choices
[
lbOpts
,
'
zrange
'
,
'
min
'
],
strings
.
choices
[
lbOpts
,
'
zrange
'
,
'
max
'
]]),
'
zoom
'
:
props
.
Widget
(
'
zoom
'
,
spin
=
False
,
showLimits
=
False
),
showLimits
=
False
,
tooltip
=
tooltips
[
'
zoom
'
]),
}
# Slice spacing and zoom go on a single panel
...
...
@@ -73,17 +92,17 @@ class LightBoxToolBar(fsltoolbar.FSLEyesToolBar):
sizer
=
wx
.
FlexGridSizer
(
2
,
2
)
panel
.
SetSizer
(
sizer
)
more
=
props
.
buildGUI
(
self
,
self
,
specs
[
'
more
'
])
screenshot
=
props
.
buildGUI
(
self
,
lb
,
specs
[
'
screenshot
'
])
zax
=
props
.
buildGUI
(
self
,
scene
Opts
,
specs
[
'
zax
'
])
zrange
=
props
.
buildGUI
(
self
,
scene
Opts
,
specs
[
'
zrange
'
])
zoom
=
props
.
buildGUI
(
panel
,
scene
Opts
,
specs
[
'
zoom
'
])
spacing
=
props
.
buildGUI
(
panel
,
scene
Opts
,
specs
[
'
sliceSpacing
'
])
more
=
props
.
buildGUI
(
self
,
self
,
specs
[
'
more
'
])
screenshot
=
props
.
buildGUI
(
self
,
lb
,
specs
[
'
screenshot
'
])
zax
=
props
.
buildGUI
(
self
,
lb
Opts
,
specs
[
'
zax
'
])
zrange
=
props
.
buildGUI
(
self
,
lb
Opts
,
specs
[
'
zrange
'
])
zoom
=
props
.
buildGUI
(
panel
,
lb
Opts
,
specs
[
'
zoom
'
])
spacing
=
props
.
buildGUI
(
panel
,
lb
Opts
,
specs
[
'
sliceSpacing
'
])
zoomLabel
=
wx
.
StaticText
(
panel
)
spacingLabel
=
wx
.
StaticText
(
panel
)
zoomLabel
.
SetLabel
(
strings
.
properties
[
scene
Opts
,
'
zoom
'
])
spacingLabel
.
SetLabel
(
strings
.
properties
[
scene
Opts
,
'
sliceSpacing
'
])
zoomLabel
.
SetLabel
(
strings
.
properties
[
lb
Opts
,
'
zoom
'
])
spacingLabel
.
SetLabel
(
strings
.
properties
[
lb
Opts
,
'
sliceSpacing
'
])
sizer
.
Add
(
zoomLabel
)
sizer
.
Add
(
zoom
,
flag
=
wx
.
EXPAND
)
...
...
This diff is collapsed.
Click to expand it.
fsl/fsleyes/controls/orthotoolbar.py
+
61
−
28
View file @
4c717e5d
...
...
@@ -8,10 +8,11 @@
import
props
import
fsl.fsleyes.toolbar
as
fsltoolbar
import
fsl.fsleyes.icons
as
icons
import
fsl.fsleyes.actions
as
actions
import
fsl.data.strings
as
strings
import
fsl.fsleyes.toolbar
as
fsltoolbar
import
fsl.fsleyes.icons
as
fslicons
import
fsl.fsleyes.tooltips
as
fsltooltips
import
fsl.fsleyes.actions
as
actions
import
fsl.data.strings
as
strings
class
OrthoToolBar
(
fsltoolbar
.
FSLEyesToolBar
):
...
...
@@ -43,36 +44,34 @@ class OrthoToolBar(fsltoolbar.FSLEyesToolBar):
orthoOpts
=
ortho
.
getSceneOptions
()
profile
=
ortho
.
getCurrentProfile
()
icns
=
{
'
screenshot
'
:
icons
.
findImageFile
(
'
camera24
'
),
'
showXCanvas
'
:
icons
.
findImageFile
(
'
sagittalSlice24
'
),
'
showYCanvas
'
:
icons
.
findImageFile
(
'
coronalSlice24
'
),
'
showZCanvas
'
:
icons
.
findImageFile
(
'
axialSlice24
'
),
'
more
'
:
icons
.
findImageFile
(
'
gear24
'
),
ic
o
ns
=
{
'
screenshot
'
:
fsl
icons
.
findImageFile
(
'
camera24
'
),
'
showXCanvas
'
:
fsl
icons
.
findImageFile
(
'
sagittalSlice24
'
),
'
showYCanvas
'
:
fsl
icons
.
findImageFile
(
'
coronalSlice24
'
),
'
showZCanvas
'
:
fsl
icons
.
findImageFile
(
'
axialSlice24
'
),
'
more
'
:
fsl
icons
.
findImageFile
(
'
gear24
'
),
'
resetZoom
'
:
icons
.
findImageFile
(
'
resetZoom24
'
),
'
centreCursor
'
:
icons
.
findImageFile
(
'
centre24
'
),
'
resetZoom
'
:
fsl
icons
.
findImageFile
(
'
resetZoom24
'
),
'
centreCursor
'
:
fsl
icons
.
findImageFile
(
'
centre24
'
),
'
layout
'
:
{
'
horizontal
'
:
icons
.
findImageFile
(
'
horizontalLayout24
'
),
'
vertical
'
:
icons
.
findImageFile
(
'
verticalLayout24
'
),
'
grid
'
:
icons
.
findImageFile
(
'
gridLayout24
'
),
'
horizontal
'
:
fsl
icons
.
findImageFile
(
'
horizontalLayout24
'
),
'
vertical
'
:
fsl
icons
.
findImageFile
(
'
verticalLayout24
'
),
'
grid
'
:
fsl
icons
.
findImageFile
(
'
gridLayout24
'
),
}
}
toolSpecs
=
[
actions
.
ActionButton
(
'
more
'
,
icon
=
icns
[
'
more
'
]),
actions
.
ActionButton
(
'
screenshot
'
,
icon
=
icns
[
'
screenshot
'
]),
props
.
Widget
(
'
showXCanvas
'
,
icon
=
icns
[
'
showXCanvas
'
]),
props
.
Widget
(
'
showYCanvas
'
,
icon
=
icns
[
'
showYCanvas
'
]),
props
.
Widget
(
'
showZCanvas
'
,
icon
=
icns
[
'
showZCanvas
'
]),
props
.
Widget
(
'
layout
'
,
icons
=
icns
[
'
layout
'
]),
actions
.
ActionButton
(
'
resetZoom
'
,
icon
=
icns
[
'
resetZoom
'
]),
actions
.
ActionButton
(
'
centreCursor
'
,
icon
=
icns
[
'
centreCursor
'
]),
props
.
Widget
(
'
zoom
'
,
spin
=
False
,
showLimits
=
False
),
]
tooltips
=
{
'
screenshot
'
:
fsltooltips
.
actions
[
ortho
,
'
screenshot
'
],
'
zoom
'
:
fsltooltips
.
properties
[
orthoOpts
,
'
zoom
'
],
'
layout
'
:
fsltooltips
.
properties
[
orthoOpts
,
'
layout
'
],
'
showXCanvas
'
:
fsltooltips
.
properties
[
orthoOpts
,
'
showXCanvas
'
],
'
showYCanvas
'
:
fsltooltips
.
properties
[
orthoOpts
,
'
showYCanvas
'
],
'
showZCanvas
'
:
fsltooltips
.
properties
[
orthoOpts
,
'
showZCanvas
'
],
'
resetZoom
'
:
fsltooltips
.
actions
[
profile
,
'
resetZoom
'
],
'
centreCursor
'
:
fsltooltips
.
actions
[
profile
,
'
centreCursor
'
],
'
more
'
:
fsltooltips
.
actions
[
self
,
'
more
'
],
}
targets
=
{
'
screenshot
'
:
ortho
,
'
zoom
'
:
orthoOpts
,
...
...
@@ -84,6 +83,40 @@ class OrthoToolBar(fsltoolbar.FSLEyesToolBar):
'
centreCursor
'
:
profile
,
'
more
'
:
self
}
toolSpecs
=
[
actions
.
ActionButton
(
'
more
'
,
icon
=
icons
[
'
more
'
],
tooltip
=
tooltips
[
'
more
'
]),
actions
.
ActionButton
(
'
screenshot
'
,
icon
=
icons
[
'
screenshot
'
],
tooltip
=
tooltips
[
'
screenshot
'
]),
props
.
Widget
(
'
showXCanvas
'
,
icon
=
icons
[
'
showXCanvas
'
],
tooltip
=
tooltips
[
'
showXCanvas
'
]),
props
.
Widget
(
'
showYCanvas
'
,
icon
=
icons
[
'
showYCanvas
'
],
tooltip
=
tooltips
[
'
showYCanvas
'
]),
props
.
Widget
(
'
showZCanvas
'
,
icon
=
icons
[
'
showZCanvas
'
],
tooltip
=
tooltips
[
'
showZCanvas
'
]),
props
.
Widget
(
'
layout
'
,
icons
=
icons
[
'
layout
'
],
tooltip
=
tooltips
[
'
layout
'
]),
actions
.
ActionButton
(
'
resetZoom
'
,
icon
=
icons
[
'
resetZoom
'
],
tooltip
=
tooltips
[
'
resetZoom
'
]),
actions
.
ActionButton
(
'
centreCursor
'
,
icon
=
icons
[
'
centreCursor
'
],
tooltip
=
tooltips
[
'
centreCursor
'
]),
props
.
Widget
(
'
zoom
'
,
spin
=
False
,
showLimits
=
False
,
tooltip
=
tooltips
[
'
zoom
'
]),
]
tools
=
[]
for
spec
in
toolSpecs
:
...
...
This diff is collapsed.
Click to expand it.
fsl/fsleyes/tooltips.py
+
8
−
3
View file @
4c717e5d
...
...
@@ -167,8 +167,8 @@ properties = TypeDict({
'
some older systems.
'
,
'
OrthoOpts.showXCanvas
'
:
'
Show / hide the X canvas.
'
,
'
OrthoOpts.showYCanvas
'
:
'
Show / hide the
X
canvas.
'
,
'
OrthoOpts.showZCanvas
'
:
'
Show / hide the
X
canvas.
'
,
'
OrthoOpts.showYCanvas
'
:
'
Show / hide the
Y
canvas.
'
,
'
OrthoOpts.showZCanvas
'
:
'
Show / hide the
Z
canvas.
'
,
'
OrthoOpts.showLabels
'
:
'
If the currently selected overlay is a NIFTI1
'
'
image, show / hide anatomical orientation
'
'
labels.
'
,
...
...
@@ -341,8 +341,13 @@ properties = TypeDict({
actions
=
TypeDict
({
'
CanvasPanel.screenshot
'
:
'
Take a screenshot of the current scene
'
,
'
OrthoToolBar.more
'
:
'
Show more view control settings
'
,
'
LightBoxToolBar.more
'
:
'
Show more view control settings
'
,
'
OrthoViewProfile.resetZoom
'
:
'
Reset zoom level to 100%
'
,
'
OrthoViewProfile.centreCursor
'
:
'
Reset location to centre of scene
'
,
})
...
...
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