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

Bugfix in vectoropts - refreshAuxImage was clobbering all settings with

modulateImage. More robust management of volume vs vector shader in
glvector_funcs.
parent df86c2d6
No related branches found
No related tags found
No related merge requests found
......@@ -181,7 +181,7 @@ class VectorOpts(volumeopts.Nifti1Opts):
"""
prop = self.getProp(imageName)
val = self.modulateImage
val = getattr(self, imageName)
overlays = self.displayCtx.getOrderedOverlays()
options = [None]
......
......@@ -31,6 +31,8 @@ def compileShaders(self, vertShader, indexed=False):
opts = self.displayOpts
useVolumeFragShader = opts.colourImage is not None
self.useVolumeFragShader = useVolumeFragShader
if useVolumeFragShader: fragShader = 'glvolume'
else: fragShader = 'glvector'
......@@ -48,7 +50,6 @@ def updateFragmentShaderState(self, useSpline=False):
changed = False
opts = self.displayOpts
shader = self.shader
useVolumeFragShader = opts.colourImage is not None
invClipValXform = self.clipTexture.invVoxValXform
clippingRange = opts.clippingRange
......@@ -67,7 +68,7 @@ def updateFragmentShaderState(self, useSpline=False):
clipLow = -0.1
clipHigh = 1.1
if useVolumeFragShader:
if self.useVolumeFragShader:
voxValXform = self.colourTexture.voxValXform
invVoxValXform = self.colourTexture.invVoxValXform
......
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