Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Michiel Cottaar
fslpy
Commits
b25c9b12
Commit
b25c9b12
authored
10 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RGB tensor mode working again for GL14 and 21. Need to look at fragment
boundary checks for line mode (and RGB mode in GL14)
parent
43e0ff9f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/fslview/gl/gl14/gltensor_rgb_funcs.py
+2
-1
2 additions, 1 deletion
fsl/fslview/gl/gl14/gltensor_rgb_funcs.py
fsl/fslview/gl/gl21/gltensor_rgb_funcs.py
+12
-1
12 additions, 1 deletion
fsl/fslview/gl/gl21/gltensor_rgb_funcs.py
with
14 additions
and
2 deletions
fsl/fslview/gl/gl14/gltensor_rgb_funcs.py
+
2
−
1
View file @
b25c9b12
...
...
@@ -83,7 +83,8 @@ def preDraw(self):
shape
=
list
(
self
.
image
.
shape
)
invshape
=
[
1.0
/
s
for
s
in
shape
]
shaders
.
setFragmentProgramVector
(
0
,
shape
+
[
0
])
shaders
.
setFragmentProgramVector
(
1
,
invshape
+
[
0
])
shaders
.
setFragmentProgramVector
(
1
,
invshape
+
[
0
])
shaders
.
setFragmentProgramMatrix
(
2
,
self
.
imageTexture
.
voxValXform
.
T
)
def
draw
(
self
,
zpos
,
xform
=
None
):
...
...
This diff is collapsed.
Click to expand it.
fsl/fslview/gl/gl21/gltensor_rgb_funcs.py
+
12
−
1
View file @
b25c9b12
...
...
@@ -43,11 +43,13 @@ def init(self):
# parameters for gltensor_rgb_vert.glsl/gltensor_rgb_frag.glsl
p
[
'
imageTexture
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
imageTexture
'
)
p
[
'
imageValueXform
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
imageValueXform
'
)
p
[
'
modTexture
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
modTexture
'
)
p
[
'
xColourTexture
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
xColourTexture
'
)
p
[
'
yColourTexture
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
yColourTexture
'
)
p
[
'
zColourTexture
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
zColourTexture
'
)
p
[
'
imageShape
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
imageShape
'
)
p
[
'
imageDims
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
imageDims
'
)
p
[
'
useSpline
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
useSpline
'
)
p
[
'
displayToVoxMat
'
]
=
gl
.
glGetUniformLocation
(
s
,
'
displayToVoxMat
'
)
...
...
@@ -93,16 +95,25 @@ def preDraw(self):
# bind the shader uniform/attribute parameters
pars
=
self
.
shaderParams
useSpline
=
display
.
interpolation
==
'
spline
'
imageShape
=
np
.
array
(
self
.
image
.
shape
,
dtype
=
np
.
float32
)
imageShape
=
np
.
array
(
self
.
image
.
shape
,
dtype
=
np
.
float32
)
imageDims
=
np
.
array
(
self
.
image
.
pixdim
,
dtype
=
np
.
float32
)
displayToVoxMat
=
np
.
array
(
display
.
displayToVoxMat
,
dtype
=
np
.
float32
)
imageValueXform
=
np
.
array
(
self
.
imageTexture
.
voxValXform
.
T
,
dtype
=
np
.
float32
)
displayToVoxMat
=
displayToVoxMat
.
ravel
(
'
C
'
)
imageValueXform
=
imageValueXform
.
ravel
(
'
C
'
)
gl
.
glUniform1f
(
pars
[
'
useSpline
'
],
useSpline
)
gl
.
glUniform3fv
(
pars
[
'
imageShape
'
],
1
,
imageShape
)
gl
.
glUniform3fv
(
pars
[
'
imageDims
'
],
1
,
imageDims
)
gl
.
glUniform1i
(
pars
[
'
xax
'
],
self
.
xax
)
gl
.
glUniform1i
(
pars
[
'
yax
'
],
self
.
yax
)
gl
.
glUniform1i
(
pars
[
'
zax
'
],
self
.
zax
)
gl
.
glUniformMatrix4fv
(
pars
[
'
displayToVoxMat
'
],
1
,
False
,
displayToVoxMat
)
gl
.
glUniformMatrix4fv
(
pars
[
'
imageValueXform
'
],
1
,
False
,
imageValueXform
)
gl
.
glUniform1i
(
pars
[
'
imageTexture
'
],
0
)
gl
.
glUniform1i
(
pars
[
'
modTexture
'
],
1
)
...
...
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