rordenlab / MRIcroGL

v1.2 GLSL volume rendering. Able to view NIfTI, DICOM, MGH, MHD, NRRD, AFNI format images.
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage
Other
204 stars 32 forks source link

Python option to adjust overlay depth #37

Closed JeffreyWardman closed 2 years ago

JeffreyWardman commented 2 years ago

Is it possible to include the following option:

gl.overlaydepth(depthPct)  -> depth percentage of overlay
neurolabusc commented 2 years ago

I assume you want to change the overlayDepth property of the render shader. For shader properties, you can call them by name:

import gl
gl.resetdefaults()
gl.loadimage('spm152')
gl.overlayload('spmMotor')
gl.minmax(1, 4, 4)
gl.opacity(1,10)
gl.shaderadjust('overlayDepth', 0.2)
JeffreyWardman commented 2 years ago

Thanks @neurolabusc! That's exactly what I was after. Cheers!

gourdchen commented 2 years ago

That's exactly what I was need, which could be added in the command.md.