Skip to content

Commit

Permalink
Enhanced Metal support, improve support for foreign formats
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jul 6, 2020
1 parent ae12e51 commit 0824e3d
Show file tree
Hide file tree
Showing 75 changed files with 8,672 additions and 2,151 deletions.
22 changes: 22 additions & 0 deletions MRIcroGL.app/Contents/Resources/lut/HSV.clut
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[FLT]
min=0
max=0
[INT]
numnodes=7
[BYT]
nodeintensity0=0
nodeintensity1=43
nodeintensity2=85
nodeintensity3=128
nodeintensity4=170
nodeintensity5=213
nodeintensity6=255
[RGBA255]
nodergba0=255|0|0|0
nodergba1=255|255|0|14
nodergba2=0|255|0|28
nodergba3=0|255|255|43
nodergba4=0|0|255|57
nodergba5=255|0|255|71
nodergba6=255|0|0|85

Binary file added MRIcroGL.app/Contents/Resources/matcap/grad.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions MRIcroGL.app/Contents/Resources/script/jstartup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import gl
gl.resetdefaults()
gl.loadimage('spm152')
gl.backcolor(255, 255, 255)
gl.mosaic("S R -0");
9 changes: 9 additions & 0 deletions MRIcroGL.app/Contents/Resources/script/startup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import gl
gl.resetdefaults()
gl.loadimage('spm152')
#open overlay: show positive regions
gl.overlayload('aal')
gl.scriptformvisible(1)
gl.overlayload('spmMotor')
gl.minmax(2, 4, 4)
#gl.orthoviewmm(37,-14,47)
6 changes: 6 additions & 0 deletions MRIcroGL.app/Contents/Resources/script/startup22.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import gl
gl.resetdefaults()
#open background image
gl.loadimage('spm152')

gl.scriptformvisible(1)
18 changes: 18 additions & 0 deletions MRIcroGL.app/Contents/Resources/script/startup4d.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import gl
gl.resetdefaults()
gl.loadimage('/Users/chris/src/dcm_qa/Ref/fMRI_MB_asc_25.nii')
#gl.opacity(1,5)
#gl.opacity(1,50)
#
# if (layer > 0) then
# Vol1.UpdateOverlays(vols);
#str = gl.atlaslabels(1)
#print(str)
#gl.minmax(1, 4, 100)


#gl.overlayload('aal')
#

#gl.generateclusters(0)
#gl.generateclusters(0, 0.5, 32, 1, 0)
9 changes: 9 additions & 0 deletions MRIcroGL.app/Contents/Resources/script/startupMonkey.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import gl
gl.resetdefaults()
gl.loadimage('/Users/chris/Neuro/MRIcroGLold/templates/inia19-NeuroMaps.nii.gz')
gl.scriptformvisible(1)
gl.atlashide(0)
gl.atlasshow(0, 151,153,129)
gl.atlasshow(0, 1215,1,3,7)
print('Regions '+ str(gl.atlasmaxindex(0)) )
#print(gl.atlaslabels(0))
25 changes: 25 additions & 0 deletions MRIcroGL.app/Contents/Resources/script/startup_aal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import gl
gl.resetdefaults()
gl.loadimage('spm152')
#open overlay: show positive regions
gl.overlayload('aal')
gl.scriptformvisible(1)
gl.atlashide(1)
gl.atlasshow(1, 17)
gl.atlasshow(1, 22)
mx = gl.atlasmaxindex(1)
print(mx)
#gl.opacity(1,50)
#
# if (layer > 0) then
# Vol1.UpdateOverlays(vols);
#str = gl.atlaslabels(1)
#print(str)
#gl.minmax(1, 4, 100)


#gl.overlayload('aal')
#

#gl.generateclusters(0)
#gl.generateclusters(0, 0.5, 32, 1, 0)
13 changes: 0 additions & 13 deletions MRIcroGL.app/Contents/Resources/script/tartup.py

This file was deleted.

5 changes: 3 additions & 2 deletions MRIcroGL.app/Contents/Resources/shader/Default.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ void main() {
FragColor = colAcc;
return;
}

if (samplePos.a < clipPos.a) {
samplePos = clipPos;
bgNearest = clipPos.a;
Expand Down Expand Up @@ -64,7 +65,7 @@ void main() {
if (gradSample.a < prevGrad.a)
gradSample.rgb = prevGrad.rgb;
prevGrad = gradSample;
vec3 n = normalize(normalize(NormalMatrix * gradSample.rgb));
vec3 n = normalize(NormalMatrix * gradSample.rgb);
vec3 d = texture(matcap2D, n.xy * 0.5 + 0.5).rgb;
vec3 surf = mix(defaultDiffuse, colorSample.rgb, surfaceColor); //0.67 as default Brighten is 1.5
colorSample.rgb = d * surf * brighten * colorSample.a;
Expand Down Expand Up @@ -99,7 +100,7 @@ void main() {
fastPass (len, dir, intensityOverlay, samplePos);
if (samplePos.a < clipPos.a)
samplePos = clipPos;
deltaDir = vec4(dir.xyz * stepSize, stepSize);
//deltaDir = vec4(dir.xyz * stepSize, stepSize);
//end fastpass - optional
while (samplePos.a <= len) {
colorSample = texture3D(intensityOverlay,samplePos.xyz);
Expand Down
Loading

0 comments on commit 0824e3d

Please sign in to comment.