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
Model registry
Operate
Environments
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
FSL
fslpy
Commits
81edf52e
Commit
81edf52e
authored
10 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Minor comments and things. About to attempt to add scrollbar support.
parent
9ed9f368
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/fslview/lightboxcanvas.py
+6
-9
6 additions, 9 deletions
fsl/fslview/lightboxcanvas.py
with
6 additions
and
9 deletions
fsl/fslview/lightboxcanvas.py
+
6
−
9
View file @
81edf52e
...
...
@@ -17,12 +17,8 @@ import fsl.fslview.slicecanvas as slicecanvas
class
LightBoxCanvas
(
slicecanvas
.
SliceCanvas
):
# I think this will work ...
# I'll have to do my own layout/scrolling. Ugh.
# Could manually add scrollbars, then set the GL
# viewport according to their position.
def
__init__
(
self
,
parent
,
imageList
,
zax
,
context
=
None
):
def
__init__
(
self
,
parent
,
imageList
,
zax
,
context
=
None
,
scrollbar
=
None
):
slicecanvas
.
SliceCanvas
.
__init__
(
self
,
parent
,
imageList
,
zax
,
context
)
...
...
@@ -32,7 +28,9 @@ class LightBoxCanvas(slicecanvas.SliceCanvas):
# nrows is automatically calculated
# in the _imageListChangd method -
# the value 0 is just a placeholder
self
.
_nrows
=
0
self
.
_nrows
=
0
self
.
scrollbar
=
scrollbar
def
_imageListChanged
(
self
):
...
...
@@ -127,6 +125,7 @@ class LightBoxCanvas(slicecanvas.SliceCanvas):
def
_resize
(
self
):
"""
Sets up the GL canvas size, viewport and projection.
"""
nslices
=
abs
(
self
.
zmax
-
self
.
zmin
)
/
self
.
_sliceSpacing
...
...
@@ -140,7 +139,6 @@ class LightBoxCanvas(slicecanvas.SliceCanvas):
slicecanvas
.
SliceCanvas
.
_resize
(
self
,
xmax
=
worldXMax
,
ymax
=
worldYMax
)
def
_draw
(
self
,
ev
):
"""
...
...
@@ -168,10 +166,9 @@ class LightBoxCanvas(slicecanvas.SliceCanvas):
# disable interpolation
gl
.
glShadeModel
(
gl
.
GL_FLAT
)
# Draw all the slices for all the images.
for
i
,
image
in
enumerate
(
self
.
imageList
):
for
zi
in
range
(
self
.
_nslices
):
self
.
_drawSlice
(
image
,
self
.
_sliceIdxs
[
i
][
zi
],
self
.
_transforms
[
i
][
zi
])
...
...
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