help > Saving background and overlays as a NIFTI image
Showing 1-5 of 5 posts
Aug 19, 2022 07:08 PM | Mario Rossi
Saving background and overlays as a NIFTI image
Hello, please forgive me if this sounds as a silly request, but I
have the need to save the result of overlaying three masks to a
background struct image (t1).
MRIcloGL works just fine both in interactive mode and by using a simple script and I can create an image (attached) but I would like, if possibile to save
everything (the background and the three overlays) as a single nifti image. Is this possible and how? Or is there a basic fundamental problem that makes it impossible?
Thanks in advance for any help,
Mario
MRIcloGL works just fine both in interactive mode and by using a simple script and I can create an image (attached) but I would like, if possibile to save
everything (the background and the three overlays) as a single nifti image. Is this possible and how? Or is there a basic fundamental problem that makes it impossible?
Thanks in advance for any help,
Mario
Aug 19, 2022 07:08 PM | Chris Rorden
RE: Saving background and overlays as a NIFTI image
The NIfTI format is designed to save scalar voxel data with high
precision. For example, your background T1 scan probably has 16-bit
precision (65535 levels of gray). Storing the your colors would
require saving as 24-bit red,breen,blue with each component having
just 8-bit precision (256 levels). This would impair your ability
to adjust contrast and brightness. Further, many NIfTI tools do not
support the RGB variation of NIfTI. You may want to think about
what problems you are trying to solve.
If you really wanted to pursue this, you could write a nibabel script
https://stackoverflow.com/questions/40534333/how-to-write-a-color-3d-nifti-with-nibabel
but this is outside the remit of MRIcroGL
If you really wanted to pursue this, you could write a nibabel script
https://stackoverflow.com/questions/40534333/how-to-write-a-color-3d-nifti-with-nibabel
but this is outside the remit of MRIcroGL
Aug 19, 2022 08:08 PM | Mario Rossi
RE: Saving background and overlays as a NIFTI image
Thanks a lot Chris for the prompt and very informative answer.
The problem is to allow a sort of Quality Assurance of the acquisition process.
May I ask you if, for all you know, this would be easier using a different format (the original images are DICOM)?
Thanks again and best regards,
Mario
The problem is to allow a sort of Quality Assurance of the acquisition process.
May I ask you if, for all you know, this would be easier using a different format (the original images are DICOM)?
Thanks again and best regards,
Mario
Aug 21, 2022 04:08 PM | Mario Rossi
RE: Saving background and overlays as a NIFTI image
Dear All, is it possible to replace the scale of the overlays with
the names? In other words, is it possible to define a "custom"
label instead of having the scale?
Thanks in advance!
Mario
Thanks in advance!
Mario
Aug 22, 2022 01:08 PM | Chris Rorden
RE: Saving background and overlays as a NIFTI image
At the moment, MRIcroGL only inserts numbers into colorbars. The
project is open source, so you can always add your own features.
You might find it easier to modify the code of NiiVue, as it is
simpler and includes developer documentation for the functions:
https://niivue.github.io/niivue/devdocs/
you can see an example of the colorbars here (click the colorer check box):
https://niivue.github.io/niivue/features/mosaics2.html
https://niivue.github.io/niivue/devdocs/
you can see an example of the colorbars here (click the colorer check box):
https://niivue.github.io/niivue/features/mosaics2.html