Skip to content
Snippets Groups Projects
Commit d98c6d1d authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Bugfix - clipping ranges made less restrictive as, after transformation

between original data range, data-type range, and texture (0-1) range,
16 bit data can become inaccurate for mask images.
parent 72d8c6da
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ class MaskOpts(volumeopts.Nifti1Opts):
self.dataMax = float(overlay.data.max())
dRangeLen = abs(self.dataMax - self.dataMin)
dMinDistance = dRangeLen / 10000.0
dMinDistance = dRangeLen / 100.0
#################
# This is a hack.
......
......@@ -148,7 +148,7 @@ class VectorOpts(volumeopts.Nifti1Opts):
# we add an offset allowing the user
# to configure the overlay such that
# no voxels are clipped.
distance = (maxval - minval) / 10000.0
distance = (maxval - minval) / 100.0
self.clippingRange.xmin = minval - distance
self.clippingRange.xmax = maxval + distance
......
......@@ -793,7 +793,7 @@ class VolumeOpts(Nifti1Opts):
# a small offset to the clipping limits
# so the user can configure the scene such
# that no values are clipped.
distance = abs(dmax - dmin) / 10000.0
distance = abs(dmax - dmin) / 100.0
self.clippingRange.xmin = dmin - distance
self.clippingRange.xmax = dmax + distance
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment