Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fsleyes
fsleyes
Commits
55c6d9bb
Commit
55c6d9bb
authored
May 01, 2022
by
Paul McCarthy
🚵
Browse files
ENH: new ortho/lightbox option to adjust location cursor width
parent
75c6108d
Changes
6
Hide whitespace changes
Inline
Side-by-side
fsleyes/displaycontext/canvasopts.py
View file @
55c6d9bb
...
...
@@ -71,6 +71,9 @@ class SliceCanvasOpts(props.HasProperties):
voxel).
"""
cursorWidth
=
props
.
Real
(
minval
=
0.1
,
default
=
1
,
maxval
=
10
)
"""Width in pixels (approx) of the location cursor. """
zax
=
props
.
Choice
((
0
,
1
,
2
),
alternates
=
[[
'x'
,
'X'
],
[
'y'
,
'Y'
],
[
'z'
,
'Z'
]],
...
...
fsleyes/displaycontext/sceneopts.py
View file @
55c6d9bb
...
...
@@ -33,6 +33,7 @@ class SceneOpts(props.HasProperties):
showCursor
=
copy
.
copy
(
canvasopts
.
SliceCanvasOpts
.
showCursor
)
cursorWidth
=
copy
.
copy
(
canvasopts
.
SliceCanvasOpts
.
cursorWidth
)
zoom
=
copy
.
copy
(
canvasopts
.
SliceCanvasOpts
.
zoom
)
bgColour
=
copy
.
copy
(
canvasopts
.
SliceCanvasOpts
.
bgColour
)
cursorColour
=
copy
.
copy
(
canvasopts
.
SliceCanvasOpts
.
cursorColour
)
...
...
fsleyes/gl/lightboxcanvas.py
View file @
55c6d9bb
...
...
@@ -740,8 +740,8 @@ class LightBoxCanvas(slicecanvas.SliceCanvas):
annot
=
self
.
getAnnotations
()
kwargs
=
{
'colour'
:
opts
.
cursorColour
,
'
w
idth'
:
1
'colour'
:
opts
.
cursorColour
,
'
lineW
idth'
:
opts
.
cursorWidth
}
annot
.
line
(
*
xverts
[
0
],
*
xverts
[
1
],
**
kwargs
)
...
...
fsleyes/gl/slicecanvas.py
View file @
55c6d9bb
...
...
@@ -156,6 +156,7 @@ class SliceCanvas:
opts
.
addListener
(
'displayBounds'
,
self
.
name
,
self
.
Refresh
)
opts
.
addListener
(
'bgColour'
,
self
.
name
,
self
.
Refresh
)
opts
.
addListener
(
'cursorColour'
,
self
.
name
,
self
.
Refresh
)
opts
.
addListener
(
'cursorWidth'
,
self
.
name
,
self
.
Refresh
)
opts
.
addListener
(
'showCursor'
,
self
.
name
,
self
.
Refresh
)
opts
.
addListener
(
'cursorGap'
,
self
.
name
,
self
.
Refresh
)
opts
.
addListener
(
'invertX'
,
self
.
name
,
self
.
Refresh
)
...
...
@@ -1160,8 +1161,8 @@ class SliceCanvas:
lines
.
append
((
x
,
yhigh
,
x
,
ymax
))
kwargs
=
{
'colour'
:
copts
.
cursorColour
,
'
w
idth'
:
1
'colour'
:
copts
.
cursorColour
,
'
lineW
idth'
:
copts
.
cursorWidth
}
for
line
in
lines
:
...
...
fsleyes/views/lightboxpanel.py
View file @
55c6d9bb
...
...
@@ -104,6 +104,7 @@ class LightBoxPanel(canvaspanel.CanvasPanel):
lbopts
.
bindProps
(
'bgColour'
,
sceneOpts
)
lbopts
.
bindProps
(
'cursorColour'
,
sceneOpts
)
lbopts
.
bindProps
(
'showCursor'
,
sceneOpts
)
lbopts
.
bindProps
(
'cursorWidth'
,
sceneOpts
)
lbopts
.
bindProps
(
'showGridLines'
,
sceneOpts
)
lbopts
.
bindProps
(
'highlightSlice'
,
sceneOpts
)
lbopts
.
bindProps
(
'highDpi'
,
sceneOpts
)
...
...
fsleyes/views/orthopanel.py
View file @
55c6d9bb
...
...
@@ -258,6 +258,10 @@ class OrthoPanel(canvaspanel.CanvasPanel):
yopts
.
bindProps
(
'cursorGap'
,
sceneOpts
)
zopts
.
bindProps
(
'cursorGap'
,
sceneOpts
)
xopts
.
bindProps
(
'cursorWidth'
,
sceneOpts
)
yopts
.
bindProps
(
'cursorWidth'
,
sceneOpts
)
zopts
.
bindProps
(
'cursorWidth'
,
sceneOpts
)
xopts
.
bindProps
(
'bgColour'
,
sceneOpts
)
yopts
.
bindProps
(
'bgColour'
,
sceneOpts
)
zopts
.
bindProps
(
'bgColour'
,
sceneOpts
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment