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

Retain thresholds when moving across volumes of 4D NIfTI #58

Closed TamerGezici closed 11 months ago

TamerGezici commented 1 year ago

Hello,

Is it possible to retain or enforce a voxel threshold value while moving through 4D NIfTI image volumes?

For example, below I set the thresholds to 0 to 0.1, however when I move to the next volume it changes, which is fine. But the threshold for the first volume is also reset. How can I retain this threshold across all of the volumes?

image

neurolabusc commented 1 year ago

This is not possible with MRIcroGL. Many 4D scans have intensity changes across volumes due to T1 effects. There are huge differences in voxel intensity with DWI scans depending on the B-weighting. A modulate like NiiVue allows very easy scripting to customize, so that might be one way to develop a viewer specific to your needs.

TamerGezici commented 1 year ago

This is not possible with MRIcroGL. Many 4D scans have intensity changes across volumes due to T1 effects. There are huge differences in voxel intensity with DWI scans depending on the B-weighting. A modulate like NiiVue allows very easy scripting to customize, so that might be one way to develop a viewer specific to your needs.

Thanks. Is it not possible using MRIcrogl's custom scripting system?

TamerGezici commented 1 year ago

Maybe you misunderstood me and said it was impossible. But after some 20 minutes reading wiki, I figured out that it can be done like this:

import gl
gl.resetdefaults()
gl.shadername('OverlaySurface')
for vol in range(0,18):
    gl.wait(1000)
    gl.volume(1, vol)
    gl.shadername('OverlaySurface')
    gl.minmax(1, 0, 0.1)
    gl.colorname (1,"4hot")

I am using the script to see how FIR beta estimates are changing across time.