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
ab094ecf
Commit
ab094ecf
authored
9 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Hacky way to get the displayRange sliders to have the data range as
their limits.
parent
eb1b217b
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/fsleyes/controls/overlaydisplaypanel.py
+17
-0
17 additions, 0 deletions
fsl/fsleyes/controls/overlaydisplaypanel.py
with
17 additions
and
0 deletions
fsl/fsleyes/controls/overlaydisplaypanel.py
+
17
−
0
View file @
ab094ecf
...
...
@@ -226,6 +226,23 @@ class OverlayDisplayPanel(fslpanel.FSLEyesPanel):
if
isinstance
(
target
,
displayctx
.
VolumeOpts
)
and
\
p
.
key
==
'
cmap
'
:
widget
=
self
.
__buildColourMapWidget
(
widget
)
if
isinstance
(
target
,
displayctx
.
VolumeOpts
)
and
\
p
.
key
==
'
displayRange
'
:
# This is a big hack. The VolumeOpts displayRange
# has limits which are much bigger than the data
# range, due to the relationship between display
# range and brightness/contrast. But we want the
# display range sliders to have the data range as
# their limits. You should think of a nicer way
# to do this.
log
.
debug
(
'
Forcing displayRange slider range to data
'
'
range: [{:0.3f}, {:0.3f}]
'
.
format
(
target
.
dataMin
,
target
.
dataMax
))
widget
.
GetChildren
()[
0
].
SetLimits
(
target
.
dataMin
,
target
.
dataMax
)
widgets
.
append
(
widget
)
...
...
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