Slack Integration
/feed https://www.nitrc.org/export/rss20_forum.php?forum_id=4442
Full instructions for installing and using the RSS app with Slack feed to Slack can be found in the Slack Help Center.
- Mar 22, 2024 02:03 AM | Norberto Nawa - National Institute of Information and Communications TechnologyTrouble loading 4D NIFTI images on Mac OS Intel (Sonoma 14.4)
Hello,
this is so trivial that I apologize in advance!
I have installed the latest version of MRIcroGL on my Mac Pro but don't seem to be able to load 4D NIFTI images. I wonder if this is a known issue and if there is a workaround? Nothing happens after I load the *.nii.gz containing 600 images but I can load individual NIFTI images with no issues.
I'm guessing this is related to this specific environment, since MRIcroGL works alright in other Macs I have access to. This is happening on a Mac Pro Intel running Mac OS Sonoma 14.4.
Here is the information displayed by About:
--
1.2.2022070b Cocoa x86-64 LLVM
Author: Chris Rorden
License: BSD 2-Clause
Version 14.4 (Build 23E214) MacPro7,1
Retina Scale: 2
ATI Technologies Inc.; OpenGL = 2.1
ATI-5.5.17; Shader=1.20
2.1 Max 3D texture: 16384
Current texture: 207x246x215 43mb
--
Any help will be greatly appreciated! Thank you very much.
Best wishes,
E.
- Mar 22, 2024 01:03 PM | Chris RordenRE: Trouble loading 4D NIFTI images on Mac OS Intel (Sonoma 14.4)
I can not replicate this on any of my machines. It appears that the computer that is causing issues is a MacPro 7,1 from 2019 which were only offered with AMD Radeon graphics cards https://support.apple.com/en-us/102887
Macs with AMD graphics cards depend on Apple drivers, and these have not seen much support, especially as Apple has moved to manufacturing their graphics cards in house. I think it is telling that the graphics driver reports "ATI Technologies Inc.; OpenGL = 2.1", as AMD acquired ATI in 2006!
https://en.wikipedia.org/wiki/ATI_Technologies
Once upon a time, ATI cards only supported power of two textures, and your data is not a power of two: 207x246x215.
You might want to see if the version of MRIcroGL that uses Metal directly instead of OpenGL (MRIcroMTLforMacOS_Sonoma) works:
https://github.com/rordenlab/MRIcroGL/releases
If this fails, I am afraid you are at the mercy of Apple's driver team, that has little incentive to support this old but capable hardware.
- Apr 1, 2024 02:04 AM | Norberto Nawa - National Institute of Information and Communications TechnologyRE: Trouble loading 4D NIFTI images on Mac OS Intel (Sonoma 14.4)
Dear Chris,
thank you for the advice. I've attempted to use the Metal version of MRIcroGL but unfortunately it does not seem to be able to load the 4D NIFTI either in my MacPro 2019.
I will use MRIcroGL in another machine while I wait for an update from Apple (though I am not holding my breath :-)
Cheers,
E.
Originally posted by Chris Rorden:
I can not replicate this on any of my machines. It appears that the computer that is causing issues is a MacPro 7,1 from 2019 which were only offered with AMD Radeon graphics cards https://support.apple.com/en-us/102887
Macs with AMD graphics cards depend on Apple drivers, and these have not seen much support, especially as Apple has moved to manufacturing their graphics cards in house. I think it is telling that the graphics driver reports "ATI Technologies Inc.; OpenGL = 2.1", as AMD acquired ATI in 2006!
https://en.wikipedia.org/wiki/ATI_Technologies
Once upon a time, ATI cards only supported power of two textures, and your data is not a power of two: 207x246x215.
You might want to see if the version of MRIcroGL that uses Metal directly instead of OpenGL (MRIcroMTLforMacOS_Sonoma) works:
https://github.com/rordenlab/MRIcroGL/releases
If this fails, I am afraid you are at the mercy of Apple's driver team, that has little incentive to support this old but capable hardware.
- Mar 6, 2024 02:03 PM | Alex Doruyterreorient *.nii images when loading
I have reorientated (and resliced) some brain scans in SPM12 which display correctly in SPM but "lose" their reorientation when loaded in MRIcroGL.
MRIcron has an option in preferences to "reorient images when loading" and the images then load in the correct orientation. Is there any equivalent that would allow me to do the same in MRIcroGL?
- Mar 9, 2024 09:03 AM | Alex DoruyterRE: reorient *.nii images when loading
Originally posted by Alex Doruyter:
I have reorientated (and resliced) some brain scans in SPM12 which display correctly in SPM but "lose" their reorientation when loaded in MRIcroGL.
MRIcron has an option in preferences to "reorient images when loading" and the images then load in the correct orientation. Is there any equivalent that would allow me to do the same in MRIcroGL?
Just realised I can save/export the reoriented version from MRIcron and then open the new file in MRIcroGL. It then retains the corrected orientation. Thanks!
- Mar 11, 2024 01:03 PM | Chris RordenRE: reorient *.nii images when loading
MRIcroGL always orients images to the nearest orthogonal orientation to world space. Note that this ensures voxels are rectangular which is useful for drawing regions and reducing aliasing artifacts. The reported coordinates in mm always use the affine rotation matrix, so they handle the fact that your image may be sliced obliquely relative to world space. I would strongly discourage exporting olbique images resliced to the grid, as this will bake in the aliasing artifacts. This is typically only an issue with raw imaging data: once you normalize an image to standard space, the standard space template will be perfectly aligned with world space (requiring a single, lossy interpolation step).
Our upcoming NiiVue allows you to show data in either voxel or world space. You can drag and drop your data to this live demo:
https://niivue.github.io/niivue/features...
Note that in the initial example the voxels are rectangular in world space, but the mesh spheres are ellipsoids, while selecting world space makes the voxels rhomboidal but the spheres are round.
- Mar 12, 2024 01:03 PM | Alex DoruyterRE: reorient *.nii images when loading
This is very informative. Thanks Chris.
- Feb 28, 2024 11:02 AM | Paula Banca - University of CambridgeInquiry regarding acknowledgment and permissions for MRICroGL use in manuscript publication
Dear all,
I have used MRICroGL to create some nice brain images, which I am going to publish as part of my article.
The journal is requesting me to include in the manuscript some form of permission / acknowledgement for use of the MRICroGL outputs, which is fair and I will obviously mention the use of MRICroGL.
However, I am not sure exactly how to do this. I wonder if you could let me know how to acknowledge the use of this software? Is there any sort of boilerplate language that covers it? Also, is there any licensing / accreditation required linked to the MRICroGL?
Thank you in advance for your help!
Best wishes,
Paula
- Feb 28, 2024 12:02 PM | Chris RordenRE: Inquiry regarding acknowledgment and permissions for MRICroGL use in manuscript publication
Any figures you create with MRIcroGL, Surfice and NiiVue are your own original art, and you do not need any permission to publish these: you and your co-authors are the original copyright holders.
While not required, I would be grateful if you could cite my tools. The current best citation is very old, and I need to stop developing new tools and publish a modern description. The best citation is:
Spatial normalization of brain images with focal lesions using cost function masking.
Brett M, Leff AP, Rorden C, Ashburner J.Neuroimage. 2001 Aug;14(2):486-500. doi: 10.1006/nimg.2001.0845.PMID: 11467921Mar 8, 2024 08:03 AM | Joel EmersonRE: Inquiry regarding acknowledgment and permissions for MRICroGL use in manuscript publicationBecause you and your co-authors are the original copyright holders, any figures you generate with MRIcroGL, Surfice, and NiiVue are your own unique work, and you do not need permission to publish them.
- Mar 3, 2024 01:03 AM | Sherri Livengood - Northwestern Universitydcm2niix and SIEMENS syngo_MR_XA30: Warning: Compressed image stored as fragments
Hi there,
Is there a version of dcm2niix that handles the new dicom compression from the SIEMENS 3T scanner software version syngo_MR_XA30?
I've been having trouble converting dicoms to nifti using dcm2niix ever since we upgraded. The scanning sequences now seemed compressed with what I think is a JPEG2000 format. Before the software upgrade, when we pushed a scan to USB, it would create a directory stucture based on scan number and type, and produce one dicom for every slice. Now, after the upgrade, all the dicoms get dumped to the root directory of the USB or DVD, and many dicoms are compressed into one. It's now hard to identify the sequences without converting them for the dicom headers or json files, and kind of a pain even after converting them.
When I try to use dcm2niix to convert them, I get a long stream of error messages like the following:
Chris Rorden's dcm2niiX version v1.0.20230411 (JP2:OpenJPEG) (JP-LS:CharLS) GCC8.4.0 x86-64 (64-bit Linux)
Found 1171 DICOM file(s)
Warning: Compressed image stored as 64 fragments: if conversion fails decompress with gdcmconv, Osirix, dcmdjpeg or dcmjp2k export_enhanced_dicomdir/24013123/53410001/67783417
Image Decompression is new: please validate conversions
I have tried to decompress the files using all four recommended tools, and I have tried using dcm2niix for Windows and Linux, verions V1.0.20230411 and V1.0.2171215.
One of the decompression utilities finally worked - but the process was quite a pain.
Is anyone else seeing this? I'm hoping there's a better way that I just missed.
Thanks so much for the help,
Sherri
- Mar 4, 2024 03:03 PM | Chris RordenRE: dcm2niix and SIEMENS syngo_MR_XA30: Warning: Compressed image stored as fragments
I believe this compression was added by a PACS or other system that touched the data. You can confirm this by directly exporting DICOMs from your console. Please check the provenance of your DICOMs to determine the source of this.
I have never seen compressed data stored as fragments except in the example DICOM images. It is technically legal, but it does impact the efficiency of the reading and compression. As you have found, very few tools will handle this data, as the DICOM standard only requires handling uncompressed data. Therefore, while your DICOM images may be technically legal, I do not think these are of archival quality.
- Feb 28, 2024 04:02 PM | uocventura mac launch error
Hello,
I have a macbook 2021 (M1 pro, Ventura 13.4.1) that wont allow running the latest MRIcroGL version. the error says access violation, clik ok to ignore or abort. both do nothing.
As reading a similar error in the forum, I have granted permissions to open internet software, moved the file to the app folder, used chrome to download, and run from the terminal (with the image attached showing error 'cannot find AFNI atlas path').
so not sure where the issue is and any help is very appreciated!
thanks
Attachment: screenshot 2024-02-28 at 11.15.10.png- Feb 28, 2024 10:02 PM | Chris RordenRE: ventura mac launch error
Can you follow these steps:
1. Download the v1.2.20220720 release MRIcroGL_macOS.dmg
https://github.com/rordenlab/MRIcroGL/releases
2. Open the dmg file and copy to your applications folder.
3. Open this version of MRIcroGl from your applications folder.
4. If this fails, open up the terminal (Applications/Utilities/terminal) and launch the software with the -r argument to reset the settings:
/Applications/MRIcroGL.app/Contents/MacOS/MRIcroGL -r
- Mar 1, 2024 07:03 PM | uocRE: ventura mac launch error
dear chris,
thanks, it did the job using the terminal option!
best
- Dec 13, 2023 10:12 PM | Cornelia WangSetting Yoke as default and change window size
Hi, all,
I am new to MRIcroGL. I am wondering if MRIcroGL can set Yoke as default when I open images. Then how can I change the window size? The default one is too large for me. Will it work if I change the script?
Thanks,
Cornelia
- Nov 13, 2023 05:11 PM | Claudiu Ivanmanipulating images
From looking at the gl library, there seems to be no way of accessing the volume data for mathematical operations. For example aplying a mask, or doing some sort of bias field correction from python. Because of that I was wondering what would be the way of incorporating new libraries. I've replaced the
python35.zip
andpython35.dll
and with an "updated" version, in my case apython3.7
but when I try to import numpy I get an error. Initially numpy was not found, but after appendingsite-packages
tosys.path
(sys.path.append(sys.path[0]+'\\site-packages')
) it is found, but still not able to load.
import sys
sys.path.append(sys.path[0]+'\\site-packages')
print(sys.path)
import numpy
output
Running Python script
['C:\\Users\\Claudiu\\bin\\MRIcroGL\\Resources\\python37.zip', 'C:\\Users\\Claudiu\\bin\\MRIcroGL\\Resources\\python37.zip\\DLLs', 'C:\\Users\\Claudiu\\bin\\MRIcroGL\\Resources\\python37.zip\\lib', 'C:\\Users\\Claudiu\\bin\\MRIcroGL', 'C:\\Users\\Claudiu\\AppData\\Roaming\\Python\\Python37\\site-packages', 'C:\\Users\\Claudiu\\bin\\MRIcroGL\\Resources\\python37.zip\\site-packages']
Traceback (most recent call last): File "C:\Users\Claudiu\bin\MRIcroGL\Resources\python37.zip\site-packages\numpy\core\__init__.py", line 22, in <module> File "C:\Users\Claudiu\bin\MRIcroGL\Resources\python37.zip\site-packages\numpy\core\multiarray.py", line 12, in <module> File "C:\Users\Claudiu\bin\MRIcroGL\Resources\python37.zip\site-packages\numpy\core\overrides.py", line 7, in <module>ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:Traceback (most recent call last): File "<string>", line 6, in <module> File "C:\Users\Claudiu\bin\MRIcroGL\Resources\python37.zip\site-packages\numpy\__init__.py", line 150, in <module> File "C:\Users\Claudiu\bin\MRIcroGL\Resources\python37.zip\site-packages\numpy\core\__init__.py", line 48, in <module>ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troublesh...
Please note and check the following:
* The Python version is: Python3.7 from "C:\Users\Claudiu\bin\MRIcroGL\MRIcroGL.exe"
* The NumPy version is: "1.21.6"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'
Python Successfully Executed
- Nov 13, 2023 06:11 PM | Chris RordenRE: manipulating images
This is outside of my expertise. I have always done things the reverse of you: I use a full local install of Python and make system calls to generate figures using MRIcroGL. This approach is documented here:
https://www.nitrc.org/plugins/mwiki/inde...
In my experience, recent releases of operating systems have intentionally hampered the ability of graphical tools to use scripting languages to prevent malware. Older versions of MRIcroGL used the system python to do everything, but this is now either deprecated or explicitly blocked depending on the operating system. It may be possible to set the 'PyLib' variable of the MRIcroGL preferences file (click Advanced from the Settings window) in some Linux distributions, but your mileage may vary.
- Nov 14, 2023 04:11 PM | Claudiu IvanRE: manipulating images
Thank you for your reply. That is a good solution for myself, but I need to write some scripts for some colleagues who are less technically inclined. This would be a compromise, so they could easily do some standard operations without the need of a full-fledged toolbox. I've experimented a bit more, but I was still not able to load numpy.
I'll try your approach, building a small GUI in Tkinter, and from there generate the images from MRIcroGL. Seems a bit of an overkill, but if there is no workaround, it might be a solution.
- Nov 14, 2023 04:11 PM | Chris RordenRE: manipulating images
Understood. There may be an elegant approach to allow standalone applications to use Python with more access to libraries - I am just not aware of this as it is outside my expertise. If this is important for you, you may want to research this and discover if there are other approaches. You may want to see how Blender uses Python.
- Nov 10, 2023 11:11 AM | rtransform - Medical University of ViennaPotential Bug: Unable to create file "C:\Users\User\.MRIcroGL12.ini"
Just wanted to briefly report some unusual behavior:
I have only recently been experiencing some odd behavior, where whenever I wanted to close MRIcriGL (running on Windows 10) I get an error popping up telling me ".MRIcroGL12.ini cannot be created as it is being used by another program" with the options "OK" (keeping the window open) and "Abort" (which then closes the application). This persisted even when freshly installing MRIcroGL.
(I had previosly mentioned running MRIcroGL in compatibility mode as a potential workaround but actually this did not resolve the problem).
Any suggestions are highly appreciated.
Thanks for creating and continuously improving MRIcroGL!
BR
- Jun 4, 2020 01:06 PM | Noelia Martinez Molina - Helsinki UniversityDescriptives from VLSM Z mapDear Chris,
I´m writing to you because I have been using mricron Draw>Descriptives to get the anatomical location of significant voxels (numVoxNotZero) after a voxelwise VLSM analysis in NiiStat. Prior to choosing these options, I just have to open an AAL image in mricron, overlay the thresholded Zmap from the VLSM and adjust the Z values for FDR=0.05.
However, I cannot get the numVoxNotZero in MRIcroGL following this approach. I tried to open the AAL image and the VLSM ZMap output as VOI. Still, I was not able to get these values.
Could you please provide a detailed explanation of how the AAL and VLSM should be open before choosing Draw>Advanced>Descriptives in MRIcroGL?
Thank you in advance for your help.
Best,
Noelia- Jun 19, 2020 08:06 PM | William Mccuddy - West Virginia UniversityRE: Descriptives from VLSM Z mapI too could benefit from a response to this answer!Jul 6, 2020 01:07 PM | Chris RordenRE: Descriptives from VLSM Z mapIf you have a statistical map loaded on top of an Atlas, you can use this procedure
1.) Load the Atlas as your background image:
Choose File/AddAtlas/aal while holding down the CONTROL key (reversing standard behavior of opening atlases as overlays)
2.) Add your statistlcal map as an overlay
a. Choose File/AddOverlay to select your own map
b. ALTERNATIVELY, for a demo you can force the map spmMotor to be added as an overlay by selecting File/OpenStandard/spmMotor while holding down the CONTROL key (reversing default behavior of loading ordinary images as backgrounds)
3.) In the Layers menu, set the "Darkest" and "Brightest" values to threshold your overlay. For the example lets set this to 2 and 4 (to hide voxels darker than t(262)=2.0.
4.) In the Layer menu with your statistical map selected, press the "Options" button and choose "Generate Cluster Table"
An interactive cluster table appears at the bottom. You can click on a cluster to see the location, you can click on the cluster table header to sort by volume (cc), Peak, or structure name. You can right click on the table to save to your clipboard:
MRIcroGL 1.2.20200707
Notes: spmMotor(interpolated) on aal
Volume Peak • PeakXYZ Peak Structure XYZ Structure
76 2.4 8×58×30 Frontal_Sup_Medial_R 10×58×29 Frontal_Sup_Medial_R(95) Frontal_Sup_R(5)
3866 3.6 6×28×50 Frontal_Sup_Medial_R -1×25×50 Supp_Motor_Area_L(42) Frontal_Sup_Medial_L(19) Frontal_Sup_Medial_R(18) Supp_Motor_Area_R(17) Frontal_Sup_L(2) Cingulum_Mid_R(1) Cingulum_Mid_L(1)
67 2.3 6×-46×26 Cingulum_Post_R 6×-46×26 Cingulum_Post_R(99) Precuneus_R(1)
51 2.2 66×-2×22 Postcentral_R 65×-2×22 Postcentral_R(100)
2448 3.3 64×-44×24 Temporal_Sup_R 64×-39×21 Temporal_Sup_R(61) SupraMarginal_R(20) Angular_R(19)
272 2.8 64×-42×2 Temporal_Mid_R 65×-41×2 Temporal_Mid_R(100)
114 2.3 54×-30×-10 Temporal_Mid_R 54×-29×-10 Temporal_Mid_R(96) -(4)
48 2.4 50×-60×12 Temporal_Mid_R 51×-61×11 Temporal_Mid_R(100)
43 2.2 50×-36×28 SupraMarginal_R 51×-37×26 SupraMarginal_R(95) Temporal_Sup_R(5)
234 2.4 4×-34×70 Paracentral_Lobule_R 4×-34×69 Paracentral_Lobule_R(100)
5739 4.3 48×48×-12 Frontal_Inf_Orb_R 42×40×-9 Frontal_Inf_Orb_R(57) Frontal_Mid_Orb_R(17) -(11) Frontal_Inf_Tri_R(9) Insula_R(5)
1937 3.4 48×-68×-2 Temporal_Inf_R 47×-69×-3 Temporal_Inf_R(37) Temporal_Mid_R(34) Occipital_Inf_R(15) -(7) Occipital_Mid_R(5) Fusiform_R(2) Cerebelum_Crus1_R(1)
69000 12.2 48×-14×56 Precentral_R 33×-14×51 Postcentral_R(24) Precentral_R(20) -(9) Frontal_Inf_Tri_R(7) Supp_Motor_Area_R(6) Parietal_Sup_R(6) Frontal_Inf_Oper_R(6) Frontal_Mid_R(5) Cingulum_Mid_R(4) Frontal_Sup_R(4) Parietal_Inf_R(4) Supp_Motor_Area_L(2) Precuneus_R(1) Paracentral_Lobule_L
42 2.3 42×-24×-10 42×-24×-9 -(71) Hippocampus_R(29)
6162 4.3 38×-14×16 Insula_R 40×-13×8 Insula_R(21) Rolandic_Oper_R(19) Temporal_Sup_R(15) -(13) Heschl_R(12) Thalamus_R(11) Putamen_R(9) Postcentral_R(1)
1538 3.3 36×-82×-46 37×-78×-42 Cerebelum_Crus2_R(76) Cerebelum_Crus1_R(14) -(7) Cerebelum_7b_R(3)
36 2.2 36×-78×18 Occipital_Mid_R 37×-79×16 Occipital_Mid_R(100)
1404 3.3 34×-58×-26 Cerebelum_6_R 34×-59×-24 Cerebelum_6_R(68) Fusiform_R(19) Cerebelum_Crus1_R(13)
737 2.9 22×24×-22 Frontal_Inf_Orb_R 18×27×-21 Frontal_Inf_Orb_R(45) Frontal_Sup_Orb_R(38) Rectus_R(17)
940 3.3 18×-82×-26 Cerebelum_Crus1_R 18×-82×-28 Cerebelum_Crus1_R(79) Cerebelum_Crus2_R(21)
65 2.4 14×58×-22 Frontal_Sup_Orb_R 13×58×-22 Frontal_Sup_Orb_R(77) -(23)
123 2.4 10×2×16 Caudate_R 9×2×14 Caudate_R(61) -(39)
1341 3.6 10×-44×-46 Cerebelum_9_R 5×-52×-45 Cerebelum_9_R(68) Cerebelum_9_L(12) -(9) Cerebelum_8_L(6) Vermis_9(6)
940 2.9 0×28×-28 -1×32×-27 -(70) Rectus_L(16) Rectus_R(11) Frontal_Sup_Orb_L(3)
837 3.7 -6×62×-24 -6×64×-16 Frontal_Mid_Orb_L(34) Rectus_L(30) -(22) Frontal_Sup_Orb_L(14)
153 2.9 -6×-80×-44 -5×-79×-44 -(97) Cerebelum_Crus2_L(3)
45 2.5 -68×-12×16 -67×-12×13 -(64) Postcentral_L(27) Temporal_Sup_L(9)
182 2.5 -60×12×-6 -59×11×-5 Temporal_Pole_Sup_L(70) -(29) Rolandic_Oper_L(1)
2627 3.4 -60×-38×-4 Temporal_Mid_L -62×-40×-3 Temporal_Mid_L(97) Temporal_Inf_L(3)
69 2.5 -54×-18×46 Postcentral_L -54×-17×47 Postcentral_L(100)
119 2.4 -42×2×-44 -43×2×-42 -(62) Temporal_Inf_L(38)
4673 3.5 -38×56×-4 Frontal_Mid_Orb_L -43×47×-7 Frontal_Mid_Orb_L(43) Frontal_Inf_Orb_L(38) -(14) Frontal_Mid_L(4) Frontal_Sup_Orb_L(1) Frontal_Inf_Tri_L(1)
488 3.3 -36×-32×42 Postcentral_L -37×-33×44 Postcentral_L(66) Parietal_Inf_L(29) -(5)
334 2.8 -34×22×-4 Insula_L -35×22×-4 Insula_L(87) Frontal_Inf_Orb_L(11) Frontal_Inf_Tri_L(2)
469 3.1 -34×18×-30 Temporal_Pole_Sup_L -35×16×-29 Temporal_Pole_Sup_L(67) Temporal_Pole_Mid_L(33)
4651 3.7 -34×-60×36 Angular_L -43×-57×40 Angular_L(43) Parietal_Inf_L(40) Occipital_Mid_L(8) Parietal_Sup_L(5) SupraMarginal_L(3) -(2)
187 2.6 -32×-66×-48 Cerebelum_7b_L -33×-66×-48 Cerebelum_7b_L(56) Cerebelum_8_L(34) Cerebelum_Crus2_L(10)
76 2.4 -32×-28×0 -32×-27×-1 -(96) Hippocampus_L(4)
8101 4.1 -30×8×60 Frontal_Mid_L -43×13×35 Frontal_Mid_L(28) Frontal_Inf_Tri_L(25) Frontal_Inf_Oper_L(24) Precentral_L(22) -(1) Postcentral_L(1)
78 2.7 -30×4×-26 -31×4×-26 -(86) Amygdala_L(10) Temporal_Pole_Sup_L(3) ParaHippocampal_L(1)
132 2.6 -2×-36×-46 -2×-38×-46 -(100)
214 2.3 -26×-78×42 Occipital_Mid_L -25×-77×43 Occipital_Sup_L(39) Parietal_Sup_L(36) Occipital_Mid_L(25)
166 2.5 -26×-6×44 -25×-6×45 -(96) Precentral_L(3) Frontal_Sup_L(1)
141 2.4 -24×-76×24 Occipital_Sup_L -25×-76×24 Occipital_Mid_L(48) Occipital_Sup_L(36) -(16)
33 2.4 -24×-56×-48 Cerebelum_8_L -24×-55×-48 Cerebelum_8_L(100)
29135 5.5 -24×-50×-22 Cerebelum_6_L -17×-60×-6 Occipital_Mid_L(16) Cerebelum_6_L(13) Cerebelum_4_5_L(13) -(13) Cerebelum_Crus1_L(8) Occipital_Inf_L(7) Lingual_R(5) Vermis_4_5(5) Cerebelum_4_5_R(2) Vermis_6(2) Vermis_3(2) Precuneus_R(2) Lingual_L(2) Thalamus_R(1) Fusiform_L(1) Thalamus_L(1) Cing
239 2.6 -20×62×-6 Frontal_Sup_Orb_L -19×64×-4 Frontal_Sup_Orb_L(82) Frontal_Mid_Orb_L(10) Frontal_Sup_Medial_L(7) Frontal_Mid_Orb_L(2)
88 2.4 -20×-6×54 -19×-6×54 -(93) Frontal_Sup_L(7)
111 2.3 -18×52×32 Frontal_Sup_L -18×53×32 Frontal_Sup_L(92) Frontal_Mid_L(8)
374 2.8 -14×16×2 Caudate_L -13×16×1 Caudate_L(65) -(20) Putamen_L(15)
4345 4.6 -14×-62×68 Precuneus_L -15×-55×65 Precuneus_L(63) Parietal_Sup_L(36) -(1)
88 2.6 -10×24×-14 Rectus_L -10×24×-14 Rectus_L(100)
42 2.2 -10×-46×26 Cingulum_Post_L -10×-47×25 Cingulum_Post_L(95) Precuneus_L(5)
42 2.2 -10×-22×30 -11×-22×30 -(100)
Alternatively, you could load an anatomical image as your background layer
1.) Load your background image:
Choose File/AddStandard/spm152
2.) Load the Atlas as an overlay image:
Choose File/AddAtlas/aal
3.) Add your statistlcal map as an overlay
a. Choose File/AddOverlay to select your own map
b. ALTERNATIVELY, for a demo you can force the map spmMotor to be added as an overlay by selecting File/OpenStandard/spmMotor while holding down the CONTROL key (reversing default behavior of loading ordinary images as backgrounds)
4.) In the Layers menu, set the "Darkest" and "Brightest" values to threshold your overlay. For the example lets set this to 2 and 4 (to hide voxels darker than t(262)=2.0.
5.) In the Layer menu with your statistical map selected, press the "Options" button and choose "Generate Cluster Table"
The script below automates steps 1..4:
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)Attachment: cluster_table.pngOct 16, 2023 03:10 PM | Natalia Ladyka-Wojcik - University of TorontoRE: Descriptives from VLSM Z mapEdit: nevermind, figured it out.
- Oct 10, 2023 11:10 AM | Kyara AldiyarovaInterpolation issue
hello! I would really appreciate some help. When running Advanced -> Interpolation between slices -> All sagittal gaps the program runs as if "All axial gaps" was selected instead. So, when interpolating, a message saying "no gaps found in the axial direction" shows up instead. How can I fix it?
- Sep 18, 2023 02:09 AM | chenzhengCan't run script with MRIcroGL on MacOS
HI, I was trying to run Python script with MRIcroGL, but every time I click run, or cmd+r, the whole application would dispear. I tried using sample script and reinstall MRIcroGL, but it still cannot run scriprt. BTW, I was running it on MacOS Sonoma with a M1 chip.
- Sep 18, 2023 12:09 PM | Chris RordenRE: Can't run script with MRIcroGL on MacOS
Are you running the beta Sonoma as your primary operating system, or are you running it as a virtualized operating system? I know that virtualized systems can not support MRIcroGL or FSLeyes yet, but I had assumed a primary operating system will support Sonoma.
One alternative is to use the MRIcroMTL version. This uses Metal instead of OpenGL so it is in theory an more optimized solution, albeit it does not support all the features.
https://github.com/rordenlab/MRIcroGL/releases/tag/v1.2.20210317
- Sep 18, 2023 04:09 PM | chenzhengRE: Can't run script with MRIcroGL on MacOS
Originally posted by Chris Rorden:
Are you running the beta Sonoma as your primary operating system, or are you running it as a virtualized operating system? I know that virtualized systems can not support MRIcroGL or FSLeyes yet, but I had assumed a primary operating system will support Sonoma.
One alternative is to use the MRIcroMTL version. This uses Metal instead of OpenGL so it is in theory an more optimized solution, albeit it does not support all the features.
https://github.com/rordenlab/MRIcroGL/releases/tag/v1.2.20210317
Thank you for your response. Yes I'm using Sonoma as primary system. I tried using MRIcroMTL but sadly it still cannot run script. So I tried using python to launch MRIcroGL with my script. It raised errors messages as follows
Fatal Python error: initsite: Failed to import the site module
Error processing line 1 of /Users/cz/.local/lib/python3.7/site-packages/google_auth-1.30.1-py3.9-nspkg.pth:
Traceback (most recent call last):
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'types'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 579, in <module>
main()
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 565, in main
known_paths = addusersitepackages(known_paths)
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 315, in addusersitepackages
addsitedir(user_site, known_paths)
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 207, in addsitedir
addpackage(sitedir, name, known_paths)
File "/Applications/MRIcroGL.app/Contents/Resources/python37/lib/python3.7/site.py", line 178, in addpackage
import traceback
ModuleNotFoundError: No module named 'traceback'
So I tried removing the google_auth-1.30.1-py3.9-nspkg.pth but same erros appered with protobuf-3.17.1-py3.7-nspkg.pth. I removed it too. Then it works! I can run Python script with MRIvroGL now! But thank you anyway for your kind help!
- Sep 19, 2023 05:09 PM | Chris RordenRE: Can't run script with MRIcroGL on MacOS
I have added an experimental solution named "MRIcroMTLforMacOS_Sonoma.zip" that you can download from here:
https://github.com/rordenlab/MRIcroGL/releases/tag/v1.2.20220720
I have noticed two small issues:
1. The application menu with the Settings and Quit menu items is not displayed.
2. If you choose the "Multiplanar (A+C+S+R)" item from the "Display" item, you may seem some transient artifacts when you click on the rendering.
Tell me if you find any other issues.
Sep 27, 2023 01:09 AM | Chris RordenRE: Can't run script with MRIcroGL on MacOSPlease update to the stable final release of MacOS Sonoma. On my M1 computer the recent versions of MRIcroGL and Surfice work fine with scripting.
Attachment: gl.png
- Sep 11, 2023 07:09 PM | Jeremy Purcell - Johns Hopkins UniversityCan the coordinate table resolution be based on the overlay map?
Hello,
I notice when generating cluster table outputs, the voxel coordinates are in the underlay space. Is it possible for them to be in the overlay space? E.g., if I have an overlay in 1x1x1mm resolution but use the default MNI152 brain in ~.7x.7x.7mm resolution I get standard coordinates in sub mm increments. It would be a bit more convenient if the resolution of these coordinates were based on the overlay maps. My current work around is to simply use an underlay that is the functional or lesion map, and then generate the cluster tables, but it would be easier if one did not need to do this.
Thanks!
Jeremy
- Sep 12, 2023 01:09 PM | Chris RordenRE: Can the coordinate table resolution be based on the overlay map?
The background image provides the spatial coordinates for the table. You can load the same image for the background and overlay to get identical dimensions.
Alternatively, you may want to reslice your template image to use the same resolution as the target image. Here is my SPM script for this purpose:
https://github.com/rordenlab/spmScripts/...
In general, you need to be cautious about reslicing thresholded images to different resolutions, as I discuss here:
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage#Cluster_Thresholds
- Sep 5, 2023 10:09 AM | Jonas PerssonSaving overlay via script
Hello,
I am trying to use MRIcroGL via a notebook to generate a volume with edges from a cluster image. However, the save function, gl.saveimg(), seems to be limited to saving the bg image. Is there any way you can specify an overlay for saving to an .nii image?
- Sep 5, 2023 01:09 PM | Chris RordenRE: Saving overlay via script
MRIcroGL is a visualization tool not a image processing tool. If you are proficient in Python, nibabel allows you to load images and apply many methods. fslmaths is another outstanding tool. You might even like my clone of fslmaths:
https://github.com/rordenlab/niimath
- Sep 1, 2023 07:09 AM | Dorothy BishopHow to cite MRIcroGL
Could you please provide citation information, so I can correctly cite it in an article? Thanks
- Aug 31, 2023 04:08 PM | Dorothy BishopWhat are the units for overlayDepth?
Thanks to another thread, I was able to find the python command for changing overlay Depth
gl.shaderadjust('overlayDepth', x)
where x is overlayDepth.
As far as I can see, the default for overlayDepth is 0.1, but I'm not sure what the units are. thanks
It would be really helpful also to have this covered in the python commands on Github. It mentions shaderadjust, but it's not easy to see what commands are covered, and an example of the various things that can be adjusted would be very helpful.
- Aug 31, 2023 04:08 PM | Chris RordenRE: What are the units for overlayDepth?
The overlay depth influences how well you can see an overlay image hidden underneath the cortex. The value ranges from 0 (cortex is opaque) to 1 (crotex is transparent at locations where there is subcortical activation). Usually values around 0.2-0.4 do a nice job of revealing the subcortical activity translucently to also show the cortex. You can interactively adjust the 'Overlay depth' slider to see this effect, as shown in the attached image:
Attachment: overlayDepth.jpg
- Aug 26, 2023 06:08 PM | ling quanHow to draw and visualize ROI by coding in MRIcroGL
To show stimulation sites in our experiment, I want to do the following steps through coding:
1) Draw spheres (e.g., Sphere1 center: 20 5 10, radius 2 mm; Sphere2 center: 25 51 11, radius 2 mm) .
2) Show these ROIs with different colors (I need five colors for five ROIs ) on rendered brain.
3) Cutout the rendered brain to improve visualisation. For example, I need to cutout the brain to show the sphere centered around 20, 5, 10. I need to know how to transform the coordinates into the inputs which could be used by the cutout function gl.cutout.
Do you know how to do this through codeing in MRIcroGL?
I checked the manual and demo scripts and didn't find corresponding code except for the cutout function. But this function doesn't accept coordinates as its inputs.
- Aug 22, 2023 08:08 AM | Mario RossiExecuting MRIcroGL with no GUI
Hello, I have a set of simple python scripts that do everything I need by applying overlay to MRI images and saving the resulting images. I would like to execute MRIcroGL WITHOUT the GUI. I know that I can start the execution from the command line but it looks like MRIcroGL always start the GUI even if the script does not require it. It looks like there is no option from the command line to turn off the GUI. Any possible trick?
Thanks in advance and best regards,
Mario
- Aug 22, 2023 12:08 PM | Chris RordenRE: Executing MRIcroGL with no GUI
Sorry, I do not know if it is possible to run MRIcroGL in headless mode. You might want to try fsleyes. Alternatively, you may want to try out the javascript NiiVue
https://niivue.github.io/niivue/
Notice that many of the node.js tests simply generate a bitmap as their output:
https://github.com/niivue/niivue/tree/ma...
Since NiiVue is based on JavaScript, it is easy to script. The emergent ipyniivue embeds NiiVue into a jupyter notebook, which may be what you are looking for. Being based on WebGL2, ipyniivue embeds directly into the jupyter notebooks.
- Aug 22, 2023 06:08 PM | Mario RossiRE: Executing MRIcroGL with no GUI
Thanks for your reply. I found an alternative by using a "dummy" X server. Basically, the graphical output is discarded. Unfortunately, exactly the same script produces two images with different width and height even (the size is different). I attach a zip with the script and the two images (produced with the X11 active and without X11).
Is there any way to force the same resolution I have with X11 even without X11?
Thanks again and best regards,
Mario
Attachment: X11_noX11.zip- Aug 22, 2023 06:08 PM | Chris RordenRE: Executing MRIcroGL with no GUI
For saving images for publication you should always use the mosaic view. The other views are scaled based on the size of your window and the resolution of your monitor. In contrast, the mosaic views height and width in pixels is determined by the base resolution of your image, reducing aliasing artifacts. I generally also use a bitmap zoom of 1 for a 1-to-1 correspondence of voxels to pixels for isotropic images:
gl.bmpzoom(1)
gl.mosaic("A L+ H -0.2 -24 -16 16 40; 48 56 S X R 0");
In general, I use a vector graphics tool to add text and numbers to title bars. If you are fine with bitmapped numbers, you may prefer a higher bitmap zoom, for example you will get four times as many pixels (2x2) with
gl.bmpzoom(2)
gl.mosaic("A L+ H -0.2 -24 -16 16 40; 48 56 S X R 0");
- Aug 22, 2023 12:08 PM | mozhdehFinding structures based on SPM T maps from SPM12 with MRIcroGL overlaying "Generate cluster table with option."
I have SPM T map which is obtained with SPM12 group statistical analysis. the features of this T maps include: p value=0.05, exthended thresholding T=4.83(based on table in SPM12), minimume of cluster size>10 voxel. Now I want to find regions with significant differences by using of AAL parcellation atlas. my questions:
1-How can I change the option in MRIcroGL based on these values which i find in SPM12?
2- I get these result in MRIcroGL, but I can't underestand these numbers in paranthesis.
Notes: rspmT_0002(interpolated) on aal(interpolated)
Volume Peak PeakXYZ Peak Structure • XYZ Structure
434 7.7 -21.2×-31.9×-37.1 -27.1×-34.8×-39.3 Cerebelum_10_L(51) -(19) Cerebelum_7b_L(16) Cerebelum_8_L(7) Cerebelum_6_L(6)
- Aug 22, 2023 02:08 PM | Chris RordenRE: Finding structures based on SPM T maps from SPM12 with MRIcroGL overlaying "Generate cluster table with option."
The peak voxel is does not overlap with your atlas. This cluster spans several brain regions:
Cerebelum_10_L(51%)
Outside Atlas (19%)
Cerebelum_7b_L(16%)
Cerebelum_8_L(7%)
Cerebelum_6_L(6%)- Aug 22, 2023 06:08 PM | mozhdehRE: Finding structures based on SPM T maps from SPM12 with MRIcroGL overlaying "Generate cluster table with option."
Thank you for your reply.
1-Do you think this finding makes sense?(reseanable?)
2- Should the obtained areas be present in the atlas?(you see peack structure is not in atlas, and some voxels didnt determine specific region in AAL atlas!!)
3- How can I report this finding in my manuscript?
Thanks
- Jul 28, 2022 10:07 PM | emilyharriottGet MNI coordinates of cluster of intensely bright voxels?Dear MRIcroGL experts,
Summary:
I would like to obtain the MNI coordinates of the center of a cluster of particularly intensely bright voxels. I see that I can get the X,Y,Z coordinates of a cluster of particularly intensely bright voxels but would like to know how to get the MNI coordinates of that cluster. How can I do that?
More information:
I am working on a dataset of ~100 participants with lesions. I segmented and normalized my T1 images to MNI space, registered my native FLAIR images to my standardized T1 images so now the FLAIR images are also standardized, ran these images through the Lesion Segmentation Tool (LST) Lesion Growth Algorithm (LGA) pipeline (Schmidt et al., 2012), and obtained two output images: a version of the FLAIR and a lesion probability map. The lesion probability map is a binary map (each voxel is either white with an intensity of 1 indicating that voxel is a lesion or dark with an intensity of 0 indicating that voxel is not a lesion). Both files are .nii.
I open both of these images (the FLAIR as an image and the lesion probability map as an added overlay) into MRIcroGL. I then select the lesion probability map, click "options", "generate cluster table with options", and then set the threshold intensity to be 1 and the minimum cluster size to be 0. I obtain a table that tells me the volume and X,Y,Z coordinates of each lesion.
How do I get the MNI coordinates of each lesion?
(also, what exactly are the X,Y,Z coordinates? what space is that in?)
Note:
I read some posts that told me I can enter MNI coordinates and then view that brain location. I don't want to enter MNI coordinates, I want to be given MNI coordinates.
Any assistance you might be able to provide would be greatly appreciated. Additionally, please let me know if my question and/or explanation did not make sense.
Thank you so very much,
Emily Harriott
PhD student, Vanderbilt University- Aug 5, 2023 01:08 PM | annsoluRE: Get MNI coordinates of cluster of intensely bright voxels?
Hello Emily!
I just ran into the same problem. Did you find a solution?
Thank you in advance!
Anna
- Aug 7, 2023 08:08 PM | emilyharriottRE: Get MNI coordinates of cluster of intensely bright voxels?
Dear Anna,
Unfortunately, no good solution for you. :/ I'm so sorry! Broadly, what I'm planning to do instead is put everything in MNI space, then transform the T1 to the FLAIR, and then using python and with a different file for each gray matter reegion, count the voxels of lesion in each region (this gets me really what I wanted in the end). I haven't done this yet, though, so crossing my fingers it works.
If you can get the image(s) into MNI space, I think you can use xjview within spm12 within matlab to see the coordinates of the center of the cluster? - if you load the T1 and the lesion map (or perhaps just even the lesion map?) and then click 'select cluster' or 'pick cluster/info' and then look at the command window (you should get the peak coordinates and center of mass coordinates for each cluster in addition to the list of regions that cluster is in/touches)?
Please let me know if you find something!
Thank you,
Emily
Aug 22, 2023 01:08 PM | Jerry RitterRE: Get MNI coordinates of cluster of intensely bright voxels?Any update? While you were searching online for an essay writer to assist you with your homework, you stumbled upon a https://studyclerk.com/do-my-homework website. In the process of your online search, you encountered a post or information that suggests the website can help you complete your homework assignments on time.
- Aug 22, 2023 01:08 PM | Chris RordenRE: Get MNI coordinates of cluster of intensely bright voxels?
No update. This is outside the remit of MRIcroGL. The project is open source, so feel free to add this feature (and submit a pull request if you wish to share it with the community). MRIcroGL is mature and stable, and will likely see only point releases going forward. You may want to take a look at NiiVue which we are actively working on with the AFNI, FSL, FreeSurfer and nilearn teams. NiiVue can be embedded into web pages, standalone applications, jupyter notebooks, vscode, etc. Since it is written in JavaScript, it is inherently scriptable.
- Feb 19, 2023 03:02 AM | neal_caffreyWarning: Assuming mosaics saved in reverse order due to 'sSliceArray.ucImageNumb'Hi,
When I attempted to convert multi-echo mprage images using dcm2niix (version v1.0.20220720), I got the following warning message:
Chris Rorden's dcm2niiX version v1.0.20220720 (JP2:OpenJPEG) (JP-LS:CharLS) MSC1900 (64-bit Windows)
Found 960 DICOM file(s)
Slices not stacked: echo varies (TE 1.64, 3.5; echo 1, 2). Use 'merge 2D slices' option to force stacking
Warning: Assuming mosaics saved in reverse order due to 'sSliceArray.ucImageNumb'
Is this something that I can ignore? Thank you for clarifying.- Feb 19, 2023 04:02 AM | Chris RordenRE: Warning: Assuming mosaics saved in reverse order due to 'sSliceArray.ucImageNumb'Hello,
Your images were acquired with H>>F image numbering mode. Siemens explicitly says you should not use this mode. Please adjust the sequence on your console. Some users assume that this acquires data in a descending rather than an ascending pattern, but this is not the case. It simply changes the order that 2D slices are written to the mosaic. I assume dcm2niix is doing the right thing, but this is virtually untested as Siemens explicitly warns users not to use this mode. Do check the spatial direction, the slice timing and the diffusion vectors if you use this mode. there is very little validation of this mode by dcm2niix (and presumably Siemens as well).
https://crnl.readthedocs.io/stc/index.ht...
see PDF by Joachim Graessner linked here https://en.wikibooks.org/wiki/SPM/Slice_...
"Do not use the mode H>>F because this complicates the numbering and you will have to sort images manually in most fMRI post-processing tools. The excitation of the slices in this case also starts caudally with the highest image numbers counting backwards!"- Jul 6, 2023 01:07 PM | larawaRE: Warning: Assuming mosaics saved in reverse order due to 'sSliceArray.ucImageNumb'
Hi,
I have a related question: We're using a Siemens Magnetom Skyra syngo MR XA30 scanner with a multiband acquisition. Since updating dcm2niix to version v1.0.20230411 the warning "Warning: Assuming mosaics saved in reverse order due to 'sSliceArray.ucImageNumb" occured. The images should be acquired with F >> H. When checking the slice timing provided in the json file after conversion, they seem to be correct compared to times from dicom tag 0018,9074 (as described as the last option here: https://github.com/rordenlab/dcm2niix/is...). What causes this warning and is there a way to solve it?
Thank you for your help!
Lara
Originally posted by Chris Rorden:
Hello, Your images were acquired with H>>F image numbering mode. Siemens explicitly says you should not use this mode. Please adjust the sequence on your console. Some users assume that this acquires data in a descending rather than an ascending pattern, but this is not the case. It simply changes the order that 2D slices are written to the mosaic. I assume dcm2niix is doing the right thing, but this is virtually untested as Siemens explicitly warns users not to use this mode. Do check the spatial direction, the slice timing and the diffusion vectors if you use this mode. there is very little validation of this mode by dcm2niix (and presumably Siemens as well). https://crnl.readthedocs.io/stc/index.ht... see PDF by Joachim Graessner linked here https://en.wikibooks.org/wiki/SPM/Slice_... "Do not use the mode H>>F because this complicates the numbering and you will have to sort images manually in most fMRI post-processing tools. The excitation of the slices in this case also starts caudally with the highest image numbers counting backwards!"
- Jul 6, 2023 02:07 PM | Chris RordenRE: Warning: Assuming mosaics saved in reverse order due to 'sSliceArray.ucImageNumb'
For Siemens systems VA-VE saving as mosaics reduced the number and size of files created. With XA Siemens upgraded to enhanced DICOM, with all slices from a non-mosaic image saved as a single, compact file. Siemens considers the XA mosaics
secondary capture images intended for quality assurance only
and the mosaics do not contain the rich sequence meta-data of non-mosaic images. When you upgrade a Siemens system to XA, it is crucial to ensure that all your sequences are set to save enhanced, non-mosaic DICOMs. Provided with impoverished DICOMs, dcm2niix will create impoverished NIfTIs. The solution to this problem is to save non-mosaic enhanced images for all future acquisitions. The Siemens Research Collaboration Manager associated with your center can provide more details.
For background, see here:
https://github.com/rordenlab/dcm2niix/issues/236
The warning is because an operator accidentally set the image numbering of the mosaic to "H>>F", presumably assuming this would change the acquisition order from ascending to descending. However, this setting only changes the image placement in the mosaic, not the acquistion. As Siemens notes: "Do not use the mode H>>F because this complicates the numbering and you will have to sort images manually in most fMRI post-processing tools."
- Jul 13, 2023 12:07 PM | larawaRE: Warning: Assuming mosaics saved in reverse order due to 'sSliceArray.ucImageNumb'
Thank you for the very fast reply! We double checked our sequences and have selected F >> H for the acquisition and ensured to export the dicoms in enhanced format. So we're not sure what might cause this warning for our data. We would also be more than happy to provide you with a sample data if this might help resolve the issue? Or do you maybe have further suggestions, what to look for?
- Jul 13, 2023 07:07 PM | Chris RordenRE: Warning: Assuming mosaics saved in reverse order due to 'sSliceArray.ucImageNumb'
I am unable to provide additonal insight without seeing your data. Feel free to share with my institutional email: https://sc.edu/study/colleges_schools/ar...
- Mar 27, 2023 02:03 PM | ZHENKAI ZHAOloss of b-value during DICOM to NIFTIHi,
I just started learing DWI image processing with MATLAB. my code needs to use NIFTI as input, so I chose to use MRIcroGL for conversion from DICOM files.
The scanner I am using is Siemens MAGNETOM Vida, and the software version is syngo MR XA31.
I used Chris Roden's dcm2niiX version v1.0.20220720 to work with the conversion.
I can confirm that the data file has not been anonymized before being exported, and they are exported as enhanced DICOM.
I first tried the b-value equals 500 and the conversion was successful on diffusion images with b-val, b-vec and nifti file exported.
when I tried smaller b-value like 50, 20, and 10, the conversion tool can generate b-val, b-vec and nifti file as well, but when I tried to open the nifti file can convert to SRC file, it said b-val is missing from the header, and I need to load the b-val mannually. I am not sure why this happens.
May I ask for some suggestions related to my issue?
Zhao- Mar 27, 2023 03:03 PM | Chris RordenRE: loss of b-value during DICOM to NIFTIYou need a higher b-value to model the water diffusion. A typical scan for DTI analysis has some images acquired with a b-value near 0 and some with strong weightings (e.g. b = 1000). You need a combination of both scans. One must apply a little bit of b-weighting, so on a Siemens scanner if you request a b=0 image, the resulting DICOM will show a low but non-zero value (e.g. b=10).
https://github.com/rordenlab/dcm2niix/bl...
From your description, it is unclear whether your issue is with dcm2niix or some other tool that expects a stronger b-value. However, it does seem inappropriate to calculate tensors and other derived diffusion values if all your images have virtually no spatial specificity. So this sounds like the correct behavior.
----------
DICOM files have changed considerably for XA31. Therefore, you will need to use the developmental branch of dcm2niix (currently v1.0.20230320) until the next stable version is released. For this reason, dcm2niix will not report b-values and vectors if they are all below 50 (as the series effectively does not have any b-weighting):
If you use Windows, you can get a compiled version here:
https://ci.appveyor.com/project/neurolabusc/dcm2niix/build/artifacts
For MacOS and Linux you can compile your own:
git clone --branch development https://github.com/rordenlab/dcm2niix.gi...
cd dcm2niix/console
make
./dcm2niix ....
Validation XA30 data is here
https://github.com/neurolabusc/dcm_qa_xa30
and XA51 data is here
https://github.com/neurolabusc/dcm_qa_cs_dl
Be warned that XA is a radical departure for Siemens, and we are actively reverse engineering this format. If you have any problems, post an issue on Github:
https://github.com/rordenlab/dcm2niix/
- Oct 13, 2021 09:10 AM | Benjamin SchurhamerFlipped VOI in MRIrcoGLWe are segmenting CT scans in MRIcroGL and after saving the VOI the resulting overlay flips the VOI to the opposite side. Any fixes for a Macbook Pro?
- Jul 6, 2022 02:07 PM | Anna DietzeRE: Flipped VOI in MRIrcoGLDear Benjamin,
could you solve your issue with this?
I'm having a similar problem: After saving my drawn lesion masks to .voi and .nii Files, one of them is flipped left-right. Sometimes the voi-file is the 'correct' one, sometime it is the nii-file.
I would be very thankful if someone knew a solution. With this problem I can never trust my lesion file to stay in the correct orientation when saving it.
Thanks,
Anna- Jul 7, 2022 11:07 AM | Chris RordenRE: Flipped VOI in MRIrcoGLAnna,
I suspect your issue is fixed with the upcoming release. Can you tell me the operating system you are using (Windows, Linux, macOS) so you can test out the upcoming release to ensure the issue is resolved.- Mar 21, 2023 08:03 PM | Santiago Gómez - Universidad Industrial de SantanderRE: Flipped VOI in MRIrcoGLChris,
We are using MRIcroGL to segment MRI, and until now, we keep facing the same issue. We are using macOS for the delineations.- Mar 22, 2023 12:03 PM | Chris RordenRE: Flipped VOI in MRIrcoGLCan you send me a sample dataset with instructions on how to replicate to my institutional email
https://sc.edu/study/colleges_schools/artsandsciences/psychology/our_people/directory/rorden_chris.php
- Feb 16, 2023 12:02 AM | Oren PolivaIs it possible to draw a voi directly on a 3d render?Hi. I really love your product. I can draw a voi on the 2d slices. However, when I try to do the same with the 3d render, I just rotate the brain around. Any tips?
- Feb 19, 2023 04:02 AM | Chris RordenRE: Is it possible to draw a voi directly on a 3d render?MRIcroGL does not show the drawing on the rendering. This makes the drawing tools work fluidly. Once you have created a drawing, you can load it as an overlay to view it on the rendering.
Alternatively, you could try the drawing tools in NiiVue, which does show drawings on the renderings:
https://niivue.github.io/niivue/
- Feb 8, 2023 02:02 PM | m radSecond overlay not showing upHi,
I've prepared the attached script to save an image of the two overlays (one showing positive and the other showing the negative values). For some reason, once I apply the gl.removesmallclusters for the second overlay, only the results for the first overlay are displayed, even though the second overlay also has sig. clusters after the cluster correction is applied (I verified this when I run the same script but switch the overlay display parameters for the first and second overlay OR if I just modify the script to only have one overlay OR if I just use the GUI and not the script).
Any idea how to resolve this issue?
Thanks,
MilenaAttachment: TEST.py- Feb 8, 2023 02:02 PM | m radRE: Second overlay not showing upI'm also attaching a sample nifti file that I used.
Thanks,
MilenaAttachment: TEST_066.nii.gzFeb 13, 2023 02:02 PM | Chris RordenRE: Second overlay not showing up1. There is something wrong with the compression of your sample file `TEST_066.nii.gz`. Most tools do not like it and those that do strip the file extension. Not sure what went wrong, perhaps it is missing the CRC footer:
fslhd TEST_066.nii.gz
Error: file does not appear to be a valid NIFTI or ANALYZE image
2. I have no problem applying small cluster with MRIcroGL 1.2.20220720 - see the attached image that shows the influence of applying the remove cluster feature. I do think your cluster threshold of 15mm3 is unrealistic for smooth data where each voxel is 2x2x2mm = 8mm3. For details, see here.
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage#Cluster_Thresholds
given that your images do not match the native background resolution, you may want to consider using this SPM script instead:
https://github.com/rordenlab/spmScripts/blob/bb984930e68952f359a7968536503b7e8dcbc419/nii_threshreslicecluster.m
```
#open background image
gl.loadimage('spm152')
gl.orthoviewmm(37,-51,37)
#open overlay: show positive regions
gl.overlayload('/Users/chrisrorden/a/TEST_066.nii')
gl.minmax(1, 3, 4)
# removesmallclusters(layer, thresh, mm, neighbors) -> only keep clusters where intensity exceeds thresh and size exceed mm. Clusters based on neighbors that share faces (1), faces+edges (2) or faces+edges+corners (3)
gl.removesmallclusters(1,3,120,2)
gl.overlayload('/Users/chrisrorden/a/TEST_066.nii')
gl.minmax(2, -3, -4)
gl.colorname (2,"3blue")
gl.removesmallclusters(2,-3,120,2)
```
3. A disadvantage of running graphical applications in Windows is that they are not associated with a command line. If you launch MRIcroGL from the command line with Linux or MacOS you will get thresholding details. For the example, with my script above:
```
RemoveSmallClusters(thresh=3.0000, mm=120)
resliced voxels 207x256x215
mm2vox=299
voxelsExceedingThresh=38587 (15476.2260mm3)
voxelsInLargeClusters=30080 (12064.2931mm3)
Load time 0
Reorient time 118
float range -12.6575717926025..6.40450620651245
float window -2.86352729797363...2.39658260345459
Init time 43
RemoveSmallClusters(thresh=-3.0000, mm=120)
resliced voxels 207x256x215
mm2vox=299
voxelsExceedingThresh=93007 (37302.6500mm3)
voxelsInLargeClusters=82839 (33224.5339mm3)
```Attachment: comp.png
- Feb 7, 2023 06:02 AM | Krystal YauError opening MRIcroGL: unable to load OpenGL 2.1Hi experts,
I am encountering the problem of opening MRIcroGL. There was an error message saying that unable to load OpenGL 2.1.
Not sure if it was because my laptop went on blue screen and shutdown itself once. Hence, the application has been crashed thereafter. It never was a problem though...
Would somebody help with this issue? Thank you so much in advance!
I'm using Window 11 to run the application.
Faithfully,
Krystal- Feb 13, 2023 01:02 PM | Chris RordenRE: Error opening MRIcroGL: unable to load OpenGL 2.1I think the easiest solution might be to start MRIcroGL from the command line with the -R option to reset everything. Alternatively, you could see if there are any files named 'MRIcroGL.ini' on your computer and remove them.
You make it sound like MRIcroGL used to run on this computer, so you should check the graphics drivers are up to date.
https://www.thewindowsclub.com/unable-to...
I do think for Windows you need a "x64-based PC," not a "ARM-based PC". You can check this by running the following in your command line:
systeminfo | findstr /C:"System Type"
Finally, you could see if other OpenGL programs work on your computer. I have not tried this, but a program like this might give you some insight:
https://sourceforge.net/projects/openglchecker/
- Dec 7, 2022 01:12 PM | murbScaling the opacity of overlayHi,
I was wondering if it is possible to scale the opacity of my overlay based on the strength of my overlayed activation? What I mean is for e.g. I have a color bar ranging from 3.3 to 14.5. With that I have a big part of the standard overlayed with "activations" so it is not very visible what parts of the brain are underneath the color. I would love to scale the opacity of the overlay so that the values closer to 14.5 would have the highest opacity (no transparency) and the closer we would get to 3.3 in my overlay the lower the opacity would be (overlay gets more and more transparent). Would something like this be possible in MRIcroGL, either in GUI or in scripting?
Thank you for your help,
Marta- Jan 26, 2023 07:01 PM | Chris RordenRE: Scaling the opacity of overlayYou may want to look at NiiVue which provides the ability to outline clusters above a threshold with opacity fading out with significance
https://niivue.github.io/niivue/features/alphathreshold.html
- Jan 26, 2023 06:01 PM | fesSave a coronar reconstruction of brainHello! Is it possible to make a coronal reconstruction of the 3D MRI data set and save it a volume? I did only find the option to display the coronal view of my data set without the possibility to save the viewed display.
Thank you very much in advance
fes- Jan 26, 2023 07:01 PM | Chris RordenRE: Save a coronar reconstruction of brainMRIcroGL and other visualization tools will consistently view data as axial, coronal or sagittal slices regardless of the order that rows, columns and slices are saved to disk. Indeed, there are 48 unique combinations:
https://github.com/rordenlab/NIfTIspace
It does this by reading the NIfTI s-form transform to transform the disk based column, row, slice (ijk) to the world-based left-right, posterior-anterior, inferior-superior (xyz) coordinates.
https://brainder.org/2012/09/23/the-nifti-file-format/
Because of this, it does not save your data reformatted to disk.
- Jan 20, 2023 02:01 PM | m radDrawing ClustersHello!
Is there a way to save a cluster of interest as a mask to then use for extraction of first level betas? I’ve seen the option for drawing, but it seems it just draws masks as spheres and I’d like to save the mask in the way the original cluster looks. Also, in the case of a big cluster, is there a way to break it up into multiple regions when wanting to create masks?
Thank you so much in advance for your help!!
Milena- Jan 20, 2023 07:01 PM | Chris RordenRE: Drawing ClustersYou can use Matlab or Python scripts for this, or use fslmaths. This is beyond the scope of MRIcroGL.
- Dec 15, 2022 02:12 PM | m radCubic interpolationHello! Is it possible to do cubic interpolation in MRIcrogL?
Thanks!
Milena- Dec 15, 2022 02:12 PM | Chris RordenRE: Cubic interpolationYes, MRIcroGL 1.2 uses the cubic interpolation algorithm described here:
https://github.com/DannyRuijters/CubicInterpolationWebGL
This is enabled by moving the `Q`uality slider in the Render panel to either the left extreme or right extreme. You can use the preference option to set a default setting for this slider. There are six settings:
0 = adaptive: poorest during interactions, best during pauses
1 = poorest
2 = poor
3 = medium
4 = better
5 = best (cubic interpolation)
The computational cost for cubic interpolation is high, so I would only use it if you have a dedicated graphics card or are working with low resolution images.- Dec 16, 2022 03:12 PM | m radRE: Cubic interpolationThank you so much for your quick reply! I tried playing with that "Q" feature, but it doesn't seem to have made a difference in my image. Am I doing something wrong? I'm replying with the pictures where that setting is on low vs high.Attachment: LowQ.png
- Dec 16, 2022 03:12 PM | Chris RordenRE: Cubic interpolationThe lowest Q setting (0) is adaptive: it uses poor quality when you interact with the image and high quality when there is a pause. The other Q settings are not adaptive, going from poor (but faster) to good (but slower). The differences are pretty subtle for inherently smooth images like the one you show here. Try the Scripting/Templates/ct_head script and notice the impact on the high gradient regions of the skull.
- Dec 16, 2022 06:12 PM | m radRE: Cubic interpolationI see - so compared to when the Q is at 2 or 3, at Q=5, the skull looks smoother (at least that's the difference I'm noticing with that sample script). Right?
- Dec 14, 2022 09:12 AM | Sarah Gerhardt - CIMH Mannheimfunctional MRI contrast maps: 2 overlays showing hypo-/hyperactivation and negative/positive values on colorbarsDear all,
I was wondering how one would be able to demonstrate that
- in fMRI studies using
- a paradigm, that includes blocks with neutral stimuli and emotional stimuli
- the contrast neutral vs. emotional might results in both
- hypoactivations (neutral > emotional) and hyperactivations (neutral < emotional).
I would therefore like to add overlays, demonstrating these opposing direction of activation.
How would I be able to this, e.g. adding one overlay including the contrast map with the full information on both directions - or should it be prepared outsides of MRIcro GL first?
I am happy to receive any input that helps me with this :)
Best, Sarah- Dec 14, 2022 11:12 AM | Chris RordenRE: functional MRI contrast maps: 2 overlays showing hypo-/hyperactivation and negative/positive values on colorbarsThe Scripting / Templates / basic menu item shows precisely this situation, where a statistical map 'spmMotor' is loaded as an overlay twice, with positive values being given the red color scheme and negative values given the blue color scheme. You can achieve the same result by using the graphical user interface to choose File / AddOverlay option to load the overlay twice. You can create statistical maps with AFNI, SPM or FSL. Andrew Jahn has some great web pages and videos to describe the processing and visualization.
- Dec 14, 2022 11:12 AM | Sarah Gerhardt - CIMH MannheimRE: functional MRI contrast maps: 2 overlays showing hypo-/hyperactivation and negative/positive values on colorbarsDear Chris,
thanks a lot for your reply and the information!
- Nov 21, 2022 03:11 PM | Krystal Yausegmentation of nii files (missing selected files)Dear experts,
May I know why not all the selected nii files being segmented? The attached file showed that there were only 2 files being processed, while 6 files were selected in Batch Editor. How should I solve it?
Thank you in advance!
Yours sincerely,
KrystalAttachment: missing_file.png- Nov 21, 2022 03:11 PM | Krystal YauRE: segmentation of nii files (missing selected files)As the post only allows one attachment, I am attaching another screenshot of the selected files for the batch.
Thank you.Attachment: selected_files.pngNov 21, 2022 03:11 PM | Chris RordenRE: segmentation of nii files (missing selected files)You have posted on the MRIcroGL forum. Your question is underspecified, but it looks like you are having issues with using CAT12 for SPM12. You might consider asking for help on the SPM12 jiscmail forum
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=SPM
I also suggest the CAT12 manual
https://neuro-jena.github.io/cat/index.html#DOWNLOAD- Nov 22, 2022 01:11 AM | Krystal YauRE: segmentation of nii files (missing selected files)Dear Chris,
Thank you so much for your reply!
Regards,
Krystal
- Dec 22, 2020 08:12 PM | Maria Jose Pelaez SoniAdd new AtlasHi,
I am new to MRIcroGL, and I wanted to know how can I add a new atlas.
Thanks :D- Dec 22, 2020 08:12 PM | Chris RordenRE: Add new AtlasAtlases are stored in the /Resources/atlas folder (for MacOS, right click on the application and choose "Show Package Contents"). The "Intention" of the NIfTI image should be set to Labels (to see the Header, select the image in the MRIcroGL Layers menu and click the "Show Header" from the "Options" button - the intention is shon on the "Statistics" tab).
- Dec 23, 2020 02:12 PM | Maria Jose Pelaez SoniRE: Add new AtlasHi,
I tried to change the Intention to Labels, but it doesn't save, do you know what can I do?
Thanks- Dec 23, 2020 03:12 PM | Chris RordenRE: Add new AtlasIf the NIfTI file is compressed, uncompress it (e.g. myatlas.nii.gz -> myatlas.nii). After modifying the header, choose File/SaveHeader menu item to save your changes.
- Mar 13, 2022 05:03 PM | John AndersonRE: Add new AtlasThis is super helpful & I'm able to add a new atlas from FSL. I can't get the labels to show up though. In FSL these are stored in a separate xml file - how would I port these over into MRIcroGL?
Thanks for a super useful tool!- Mar 13, 2022 07:03 PM | Chris RordenRE: Add new AtlasYou can include a text file with the name filename.txt (or filename.nii.txt if your atlas is filename.nii.gz). Alternatively, you can embed this text file into the NIfTI header after the first 352 bytes and before the image data (just make sure your Vox_offset includes this).
I would suggest Unix style line endings (0x0A) and each row lists a region, with each line starting with the intensity index, a space and then the name of the region:
1 Precentral_L 2001
2 Precentral_R 2002
3 Frontal_Sup_L 2101
4 Frontal_Sup_R 2102
5 Frontal_Sup_Orb_L 2111
6 Frontal_Sup_Orb_R 2112
7 Frontal_Mid_L 2201
8 Frontal_Mid_R 2202
9 Frontal_Mid_Orb_L 2211
10 Frontal_Mid_Orb_R 2212
11 Frontal_Inf_Oper_L 2301
12 Frontal_Inf_Oper_R 2302
13 Frontal_Inf_Tri_L 2311
14 Frontal_Inf_Tri_R 2312
15 Frontal_Inf_Orb_L 2321
16 Frontal_Inf_Orb_R 2322
17 Rolandic_Oper_L 2331
18 Rolandic_Oper_R 2332
19 Supp_Motor_Area_L 2401
20 Supp_Motor_Area_R 2402
...- Sep 18, 2022 04:09 AM | Pin-Wei ChenRE: Add new AtlasHello dear expert,
I'm a novice user of MRIcroGL and intend to see labels of a new added atlas as well.
I created a text file with the same name as the atlas file I added ("MNI152NLin2009cSym_CerebrA.txt" & "MNI152NLin2009cSym_CerebrA.nii").
This text file contains only 2 columns, no headers, separated by spaces, and uses Unix-style line endings. The first column is the serial number (intensity index) and the second column is the corresponding label name (replace spaces with underscores):
1 Rostral_Middle_Frontal_R
2 Vermal_lobules_VI-VII_R
3 Inferior_temporal_R
4 Accumbens_Area_R
5 Inferior_Lateral_Ventricle_R
6 Pericalcarine_R
7 Lateral_Orbitofrontal_R
8 Rostral_Anterior_Cingulate_R
9 Superior_Parietal_R
10 Inferior_Parietal_R
...
I put this text file under the "atlas" folder. However, when I open the atlas, the label names are not showing up automatically. I'd tried to drag it on the user interface and failed to achieve too.
Where did I go wrong and what should I do?
Many thanks.- Sep 20, 2022 03:09 PM | Chris RordenRE: Add new AtlasThe first column (index number) is separated from the second column (name) with a tab. This allows names to have spaces. Make sure your NIfTI header sets the 'Intention' as 'Labels'
Nov 3, 2022 03:11 PM | elegranRE: Add new AtlasHi,
I follow you advice but unfortunately when saving the new nifti file with 'intention' set to 'Labels' I cannot open the image because the following error came out 'This image file is smaller than described in header'.
Could you help me?
Thank you
Eleonora
- Oct 10, 2022 02:10 PM | Sam Knight - KCLGenerate table of standard deviations?I have found the option to "generate table of means" for an overlay applied to the ROIs of an atlas really useful. Is it somehow possible to do the same for standard deviation of intensity for ROIs of an atlas?
Thanks,
Sam
- Oct 7, 2022 01:10 PM | m radColors for different clustersHi,
Is there a way to get different clusters in a same niftii file to be colored differently? I'm attaching what that looks like in bioimagesuite.
Thank you!
MilenaAttachment: ROI3_mintgreen_correct.png- Oct 9, 2022 08:10 AM | Chris RordenRE: Colors for different clustersYou can use your favorite scripting language to label each cluster uniquely. Here is a Python solution,Attachment: cluster_label.py
- Oct 8, 2022 07:10 AM | zrsroxanneFlip the picture up and downDear all,
I wonder if I can flip the pictures up and down(not L/R)??
I dont find the specific function, so do I need to write a shell to fullfill the it?
Thanks advance for your kind guidance.- Oct 8, 2022 08:10 AM | Chris RordenRE: Flip the picture up and downThe MRIcroGL preferences allow you to choose between radiological or neurological convention
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage#Neurological_versus_radiological_convention
which reverses whehterh the patinets left is on the left or right side of the screen. All conventions have anterior toward the top of the screen and posterior toward the bottom for the axial slices.
- Oct 3, 2022 09:10 PM | Emily Adamic - Laureate Institute for Brain ResearchDiscrete color scale?I am visualizing a binary map with values of 1, 2, or 3. I need a discrete colour scale (voxels of 1 = orange, 2=blue, 3=red), similar to what I can do in the AFNI viewer (see attached).
Is this possible in MRIcroGL? Currently I can only use the default continuous scales, without the ability to customize.
Thank you!!Attachment: ADE.crosswhole.Rinsx39.withz-7cross.jpg- Oct 4, 2022 01:10 PM | Chris RordenRE: Discrete color scale?1. In the "Options" pulldown of the layers menu, make sure that "Load Smooth Overlays" is Unchecked. This will ensure that values stay discrete, e.g. a partial volume at the boundary of "2" and "3" should not get the value 2.5
2. From the color pulldown table choose a scheme with many hues, for example "Viridis", "Plasma" and "Magma" look distinct but also work with common forms of color blindness.
3. Set the "Darkest and Brightest" values to bound the values of interest.- Oct 4, 2022 05:10 PM | Emily Adamic - Laureate Institute for Brain ResearchRE: Discrete color scale?When I uncheck "Load smooth overlays", it doesn't seem to really affect the outcome?
I have a map of voxels with values of either 1's, 2's, or 3's... I was wondering if, similar to AFNI, I could manually set the colours of each discrete value?
What I've done so far is find a colour scheme in MRIcroGL (NIH, for example) and set the darkest/brightest values to adjust the scale so that 1, 2, and 3 fall on colours that are different from each other. Gives me enough flexibility that I can find one that works :D.- Oct 4, 2022 06:10 PM | Chris RordenRE: Discrete color scale?This option determines how future images are loaded - you can load different images with or without smoothingg (nearest neighbor vs trilinear interpolation).
Try Scripting/Templates/jagged to see one overlay loaded with smoothing and the other without.
- Sep 28, 2022 04:09 PM | spinystellateAdjusting rotation of rendered view in mosaic (in script)Is there a way to rotate the rendering with the other views in a mosaic in a script?
When I run the following:
gl.mosaic("C -10, S 39; A 8, R 0")
and then manually select Multi-planar (A+C+S+R) and then re-enter the coordinates [-10, 39, 8], the rendered view is automatically rotated. I would like my script to do this without my manual intervention.- Sep 28, 2022 05:09 PM | Chris RordenRE: Adjusting rotation of rendered view in mosaic (in script)The rendering uses the last specified orientation: Axial, Coronal or Sagittal. The polarity (-0 vs 0) rotates by 180 degrees:
```
C -10 S 39 A 8; A R 0 A R -0 C R 0 C R -0 S R 0 S R -0
```
- Sep 20, 2022 03:09 PM | doppelhelixxAdd Atlas incl. labels in WindowsHi,
first of all, thanks for this great software!
I was wondering how I can add an Atlas in MRIcroGL on Windows. On Mac there is this option under files, but could not find it on Win. When dragging the aal.nii.gz file into MRIcroGL the brain with different coloured areas is visible - but unfortunaley the labels are not there (when clicking on an area in 2D view.
Thanks!Attachment: Capture.PNG- Sep 20, 2022 04:09 PM | Chris RordenRE: Add Atlas incl. labels in WindowsI am unable to replicate. I just downloaded a fresh install of MRIcroGL for Windows from NITRC. The 'Add Atlas' item appears in the 'File' menus, and it is able to show the AAL regions without issue.Attachment: GLwindows.png
- Sep 20, 2022 04:09 PM | doppelhelixxRE: Add Atlas incl. labels in WindowsOh, thank its probably due to the older version (2018). Thanks.
- Sep 17, 2022 06:09 PM | genchas - Clinic of Psychiatry and Psychotherapy, LMUHow to removes intensity bars from the MRIcroGL?Dear all,
I want to overlay some ROI on an standard MNI space. However, when I overlay these ROIs, the display shows an intesity bar for each of these ROIs. Is there any chance to remove the intensity bars from the display?
Best,- Sep 17, 2022 07:09 PM | Chris RordenRE: How to removes intensity bars from the MRIcroGL?You can open binary maps with Draw/OpenVOI if you want to edit them, or File/AddOverlay if you are not planning to modify the region. You can show or hide the colorbar with the Color/Colorbar/Visible menu item.
- Sep 13, 2022 11:09 AM | overlayquestioOverlay not showing upHi,
I have been working with PET imaging and I have tried to visualize some parameters with MRIcroGL.
Whenever i try to overlay an image (nifti) over an MRI template, the overlay does not show up and the colorbar ranges from 0 to 1.
If I just open the same nifti file without it being an overlay it works fine.
How can I fix this problem so I can overlay my nifti files on top of a MRI template?
Kind regards- Sep 13, 2022 01:09 PM | Chris RordenRE: Overlay not showing upYou need to spatially normalize the PET image to match the space of the template image. You can use FSL, ANTS, AFNI, or SPM to normalize you image. For MRI scanners, the initial origin of the image is the magnet isocenter, which is typicaly inside the head for brain scans. For CT (and I presume PET) the origin for DICOM is the table center, which is often a meter away from the head.
- Sep 13, 2022 01:09 PM | overlayquestioRE: Overlay not showing upThank you for the quick response.
I forgot to mention that the preprocessing for the Nifti files are all done.
If i load the template and the Nifti file in PMOD for example, everything is aligned.
Could there be another reason for this problem?
I appreciate the help.- Sep 13, 2022 01:09 PM | Chris RordenRE: Overlay not showing up1. Can you share your sample datasets with my institutional email:
https://sc.edu/study/colleges_schools/artsandsciences/psychology/our_people/directory/rorden_chris.php
2. PMOD is proprietary software, so without seeing the images I can only speculate. However, I am going to go out on a limb here and suggest that they do not implement the NIfTI format correctly, e.g. either ignoring the SForm or giving the QForm precedence over the SForm.
3. PMOD is professional software. They have an obligation to support their users. I suggest you contact them and ask them why their software is incompatible with open tools like SPM, FSL and MRIcroGL.
- Sep 7, 2022 04:09 AM | Krystal YauBatch conversion of DICOM images to NIFTI filesHi MRIcroGL users,
It may be a dump question as I am still exploring the software. I have a bunch of subjects to do the conversion, I tried to put them in a zipped folder/ simply in a separate master folder. However, it did not let me proceed. Would anyone kindly advise about this?
Thank you so much in advance!
Sincerely,
Krystal- Sep 7, 2022 12:09 PM | Chris RordenRE: Batch conversion of DICOM images to NIFTI filesMRIcroGL does not extract images in a zipped archive. It is able to read NIfTI images that are either uncompressed (.nii) or compressed (.nii.gz). It is able to convert DICOM images to NIfTI, and does automatically detect and read several formats that are less common in our field:
https://github.com/rordenlab/i2nii#supported-image-formats
- Aug 26, 2022 02:08 PM | Mario RossiChanging coordinates(X,Y,Z) in a scriptDear All, I apologize for another silly question, but I can not find an example in the script or a direct pointer in the documentation.
I would like to include in a script a change of coordinates (in particular changing he Z value) similar to what can be done
from the GUI. Basically I want automate what is shown in the attached screenshot
What is the primitive I need to use? Is the a full reference of the available primitives?
Thanks in advance,
MarioAttachment: SetZ40.png- Aug 26, 2022 03:08 PM | Chris RordenRE: Changing coordinates(X,Y,Z) in a scriptChoose Scripting/Templates/Help to see all details on all MRIcroGL specific functions. The orthoviewmm(x,y,z) allows you to set the MPR slice:
```
import gl
gl.resetdefaults()
gl.loadimage('spm152')
#open overlay: show positive regions
gl.overlayload('spmMotor')
gl.minmax(1, 4, 7)
gl.orthoviewmm(0,0,35)
```
Alternatively, you could use the mosaic option:
```
import gl
gl.resetdefaults()
gl.loadimage('spm152')
#open overlay: show positive regions
gl.overlayload('spmMotor')
gl.minmax(1, 4, 7)
gl.mosaic("C 0 S 0 A 35")
```- Aug 26, 2022 04:08 PM | Mario RossiRE: Changing coordinates(X,Y,Z) in a scriptThanks a lot Chris. you reply solves the specific issue and gives a straight pointer to the whole doc.
I will exploit your availability to ask another question.
Is it correct that MRIcroGL does the overlay trying to align the background image and the overlay if they have different resolutions?
Thanks again!
Mario- Aug 26, 2022 05:08 PM | Chris RordenRE: Changing coordinates(X,Y,Z) in a scriptYes, MRIcroGL will use the spatial transform to reslice the overlay image to the resolution of the background image. The interpolation used is either nearest neighbor or trilinear, depending on whether 'Load smooth overlays' is selected in the 'Options' pulldown of the 'Layers' panel.
- Aug 19, 2022 07:08 PM | Mario RossiSaving background and overlays as a NIFTI imageHello, 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,
MarioAttachment: myBitmap.png- Aug 19, 2022 07:08 PM | Chris RordenRE: Saving background and overlays as a NIFTI imageThe 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- Aug 19, 2022 08:08 PM | Mario RossiRE: Saving background and overlays as a NIFTI imageThanks 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- Aug 21, 2022 04:08 PM | Mario RossiRE: Saving background and overlays as a NIFTI imageDear 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- Aug 22, 2022 01:08 PM | Chris RordenRE: Saving background and overlays as a NIFTI imageAt 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
- Aug 10, 2022 02:08 PM | Asuka Toyofukufailure in depicting DTI (TBSS) resultsHi, everyone. I've researched using DTI (especially TBSS), and I have a question about settings in MRIcroGL.
I'd like to display the DTI results (which looks significant in FSL) to make a figure in MRIcroGL. However, the p-value in in MRIcroGL (darkest = 0, brightest = 0.978662) is smaller than the one in FSL (0.988588). Maybe because of this, the depicted significant areas look way smaller in MRIcroGL.
When I overlaid the mean skeleton file (which is green thick lines), the results are too small to be seen.
If you experienced a similar phenomenon, I'd appreciate it if you could tell me how you dealt with it!- Aug 12, 2022 05:08 PM | Chris RordenRE: failure in depicting DTI (TBSS) resultsYou can always change the "Darkest" and "Brightest" values in the Layers panel to set the desired contrast and brightness. In the Layers panel the Options pull down menu also has a toggle for "Load Smooth Overlays" that can influence the appearance of volumes.
- Aug 13, 2022 09:08 AM | Asuka ToyofukuRE: failure in depicting DTI (TBSS) resultsHi Chris!
Thank you so much for your reply.
You're right, and that's exactly the problem I'm facing...
When i change values to the darkest = 0.95 and the brightest = 1.00 ('cos p< 0.05 is what we want to display), the significant area looks so small, and the smoothing didn't change this too much.
I was wondering this might be because the initial brightest value (the one when i upload the image in MRIcroGL) is different from the initial brightest values in FSL in the first place.
But anyway, I really appreciate your kind reply!!
- Aug 11, 2022 07:08 PM | laurannecolor bar overlay not displaying valuesHi,
When I overlay a mask with values ranging between 0.5 and 2.0, I visually get a correct color range for the overlay mask, but the color bar legend does not display any values, although there are 5 'empty marks' displayed on the color bar.
Is there a way how I can get these values displayed on the color bar?
Thank you
Lauranne- Aug 11, 2022 07:08 PM | Chris RordenRE: color bar overlay not displaying valuesI am not sure I understand the question. Usually we use the term mask to refer to a binary image with no variability - a voxel is either on or off. If you do Scripting/New and paste the script below into the scripting window and then use Scripting/Run you should see a colorbar with the 0.5..2.0 with tick marks at 0.6, 0.9, 1.2, 1.5, 1.8:
import gl
gl.resetdefaults()
#open background image
gl.loadimage('spm152')
#open overlay: show positive regions
gl.overlayload('spmMotor')
gl.minmax(1, 0.5, 2)
You might also report the version of MRIcroGL (e.g. 1.2.20220720) and the operating system: Windows, macOS or Linux.- Aug 11, 2022 07:08 PM | lauranneRE: color bar overlay not displaying valuesMy apologies for the confusing terminology. The overlay I'm using is not binary, but has values ranging from 0.5 to 2.0.
I'm using MRIcroGL 1.2.20190902 on windows.
Running the script below also gave me a colorbar without values (attached File).
You pointing out the operating system and version, I realized I might give it a try on my other device, macOS 1.2.2021007 and this seems to work, so I guess it must have something to do with either the version or the operating system!
Thanks!Attachment: question_mricrogl.png
- Aug 11, 2022 02:08 PM | Martina VSlice numbers overlay imageHello,
I have a very basic question as I am just a novice in using MRIcroGL. When I display my overlays over the MNI in mosaic mode axial orientation, the slice numbers are put over the frontal areas of the image in certain slices numbers. How can I increase distance between the slice numbers and the scan images?
Thank you for your help in advance.
MartinaAttachment: Screenshot 2022-08-11 at 15.23.32.png- Aug 11, 2022 02:08 PM | Chris RordenRE: Slice numbers overlay imageFor publication, I would generate an image without slice numbers (e.g. remove "L +"). You can then add slice numbers using your favorite vector art tool (e.g. CorelDraw, Illustrator, etc) that will look nicer than a bitmap font. Alternatively, report slice numbers in the text of your legend.
- Jan 11, 2022 03:01 PM | Sam Knight - KCLTemplate scripts are not working in latest version (OSX)It says it cannot find Python home: /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7.dylib/python37
Previous version scripts work fine. Any idea how I could fix this?Attachment: Screenshot 2022-01-07 at 12.05.25.png- Jan 11, 2022 04:01 PM | Chris RordenRE: Template scripts are not working in latest version (OSX)1. Can you provide the text when you choose MRIcroGL/About
1.2.20211007 Cocoa ARM64 LLVM
Author: Chris Rorden
License: BSD 2-Clause
Version 11.5.2 (Build 20G95) MacBookAir10,1
Retina Scale: 1
Apple; OpenGL= 2.1 Metal - 71.7.1; Shader=1.20
2.1 Max 3D texture: 2048
Current texture: 768×768×34 76mb
2. Can you paste the output of running "sw_vers" from the terminal command line?
sw_vers
ProductName: macOS
ProductVersion: 11.5.2
BuildVersion: 20G95
3. If you are using a version prior to v1.2.20211006, does downloading and installing the dmg for that version resolve your issue?
https://github.com/rordenlab/MRIcroGL/re...- Jan 15, 2022 03:01 AM | Chuanji GaoRE: Template scripts are not working in latest version (OSX)Hi Chris,
Hope you are doing well.
I had the same issue when using the latest version: 1.2.20211006 on my mac big Sur 11.5.2.
"Unable to find Python home: /System/Library/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib/python37"
1. Can you provide the text when you choose MRIcroGL/About
1.2.20211006 Cocoa x86-64 LLVM
Author: Chris Rorden
License: BSD 2-Clause
Version 11.5.2 (Build 20G95) MacBookPro16,1
Retina Scale: 2
ATI Technologies Inc.; OpenGL= 2.1 ATI-4.6.20; Shader=1.20
2.1 Max 3D texture: 16384
Current texture: 207×256×215 43mb
2. Can you paste the output of running "sw_vers" from the terminal command line?
ProductName: macOS
ProductVersion: 11.5.2
BuildVersion: 20G95
One thing that may be related, when I type "which python" in terminal, i got
which python
/Users/u250167/opt/anaconda3/bin/python
Could you give me some advice on this? ThanksJan 15, 2022 03:01 PM | Sam Knight - KCLRE: Template scripts are not working in latest version (OSX)Originally posted by Chris Rorden:1. Can you provide the text when you choose MRIcroGL/AboutHi Chris,
1.2.20211007 Cocoa ARM64 LLVM
Author: Chris Rorden
License: BSD 2-Clause
Version 11.5.2 (Build 20G95) MacBookAir10,1
Retina Scale: 1
Apple; OpenGL= 2.1 Metal - 71.7.1; Shader=1.20
2.1 Max 3D texture: 2048
Current texture: 768×768×34 76mb
2. Can you paste the output of running "sw_vers" from the terminal command line?
sw_vers
ProductName: macOS
ProductVersion: 11.5.2
BuildVersion: 20G95
3. If you are using a version prior to v1.2.20211006, does downloading and installing the dmg for that version resolve your issue?
https://github.com/rordenlab/MRIcroGL/re...
1.2.20211006 Cocoa x86-64 LLVM
Author: Chris Rorden
License: BSD 2-Clause
Version 12.1 (Build 21C52) MacBookPro14,1
Retina Scale: 2
Intel Inc.; OpenGL= 2.1 INTEL-18.3.5; Shader=1.20
2.1 Max 3D texture: 2048
Current texture: 207×256×215 43mb
2.
ProductName: macOS
ProductVersion: 12.1
BuildVersion: 21C52
3. The previous version (v1.2.20210824) works fine. I'll continue to use this version for now.
Jan 16, 2022 12:01 PM | Jan SandaRE: Template scripts are not working in latest version (OSX)Originally posted by Sam Knight:It says it cannot find Python home: /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7.dylib/python37The same problem. Reinstallation didn't work for me :(
Previous version scripts work fine. Any idea how I could fix this?Jan 16, 2022 04:01 PM | Chris RordenRE: Template scripts are not working in latest version (OSX)I have created a new issue
https://github.com/rordenlab/MRIcroGL/issues/35
Unfortunately, I can not replicate this issue on my system. Can you try these two methods in sequence to see if they resolve your issue:
1. Install the v1.2.20211007 .dmg
https://github.com/rordenlab/MRIcroGL/re...
2. If this fails, does launching the application from the terminal command line with the "-r" argument resolve the issue? This varies depending on your installation location, but for most users it is:
/Applications/MRIcroGL.app/Contents/MacOS/MRIcroGL -r- Jan 17, 2022 09:01 AM | Sam Knight - KCLRE: Template scripts are not working in latest version (OSX)Hi Chris,
Thanks for your help. v1.2.20211007 seems to work fine.
Best wishes,
Sam
Jan 17, 2022 12:01 AM | Chuanji GaoRE: Template scripts are not working in latest version (OSX)Hi Chris,
I have installed the version (v1.2.20211007) that you pointed to and it works perfectly now!
Thanks!
Best,
ChuanjiJan 17, 2022 02:01 PM | Chris RordenRE: Template scripts are not working in latest version (OSX)OK, I have upgraded the macOS package hosted on NITRC to include this fix. This support will also be part fo future releases.Jul 11, 2022 06:07 PM | Tanya WenRE: Template scripts are not working in latest version (OSX)Hi Chris,
I seem to be having a similar issue, but with Linux (Ubuntu 18.04.6 LTS), when trying to use the template scripts.
The MRIcroGL version is 1.2.20211006 GTK2 x86-64 LLVM.
It says "Unable to find Python library". If I press OK, there's another message that shows up on the GUI saying "Unable to start PythonBridge".
I've attached a screenshot of the error. Could you please help with this?
Thank you!Attachment: screenshot_mricrogl.png- Jul 13, 2022 11:07 AM | Chris RordenRE: Template scripts are not working in latest version (OSX)Hello,
I only have computers with Ubuntu 20.04 and 22.04. In general, Debian distributions like Ubuntu get frozen at the date of their release, so it can be hard to support modern Python on older releases.
One option would be to try:
apt install libpython3-dev
You could also try the Linux version from 7-October-2021 that includes Python
https://github.com/rordenlab/MRIcroGL/re...
Tell me if either of these work.
Perhaps other users have experience with these older distributions.- Jul 13, 2022 07:07 PM | Tanya WenRE: Template scripts are not working in latest version (OSX)Thanks for your reply Chris. Unfortunately neither solution worked.
My Python is up to date. I ran sudo apt install libpython3-dev and got:
libpython3-dev is already the newest version (3.6.7-1~18.04).
I also downloaded the 7-October-2021 version that includes Python, but the GUI wouldn't launch.
I suppose the simplest solution might be for me to update my Ubuntu to a newer version.
Aug 10, 2022 11:08 AM | Chris RordenRE: Template scripts are not working in latest version (OSX)Hello
Can you try teh MRIcroGL_linux1804.zip release from here:
https://github.com/rordenlab/MRIcroGL/releases/tag/v1.2.20220720
the scripting appears to work on Ubuntu 18.04
https://github.com/rordenlab/MRIcroGL/issues/43
if this works for you, I will upload the files from Github to NITRC for a general release.- Aug 10, 2022 11:08 PM | Tanya WenRE: Template scripts are not working in latest version (OSX)Hi Chris, the MRIcroGL_linux1804.zip scripting works on my Ubuntu 18.04.
Thanks so much for your help and for your continuous development of MRIcroGL!
- Aug 5, 2022 12:08 PM | makisMRIcroGL is crushing when trying to run codeI updated my macbook to the Monterey version. MRIcroGL opens normally but when I write some code and try to execute it the application quits automatically.
How can I resolve this?- Aug 5, 2022 03:08 PM | Chris RordenRE: MRIcroGL is crushing when trying to run codeBe aware that Monterey has substantially restricted application abilities to prevent malicious use. I wonder if you are using a version of MRIcroGL that predates this operating system?
1. Are you using v1.2.20220720?
https://github.com/rordenlab/MRIcroGL/re...
2. What is the output when you select the About box, in particular I am curious about the CPU and GPU you are using. Can you please copy the whole text, it should look like this:
1.2.20220720 Cocoa ARM64 LLVM
Author: Chris Rorden
License: BSD 2-Clause
Version 11.6.5 (Build 20G527) MacBookAir10,1
Retina Scale: 1
Apple; OpenGL= 2.1 Metal - 71.7.1; Shader=1.20
2.1 Max 3D texture: 2048
Current texture: 155×193×200 23mb
- May 5, 2022 01:05 PM | Lisa Schmidt - Philipps University Marburg / Clinic for Psychaitry and PsychotherapyCannot change overlay color of DTI nii.gzHey guys,
I want to make a really nice figure of my DTI results
First I loaded the MNI standard brain and added my results as overlay files.
I cannot change the color of the overlays and really do not know why
The color is default purple for all overlays. It would be very helpful to have different colors
I can also add my results as VOIs (in red color) and are able to change transparency
but the VOIs can only be seen in 2d views
They vanish in 3d and I ask myself again why?- May 24, 2022 01:05 PM | Chris RordenRE: Cannot change overlay color of DTI nii.gzThe color of the V1 mapping is fixed. You may find FSLeyes a better tool for viewing those results.
Region of interest drawings only appear in the 2D slices, not the rendering view. This allows rapid editing for data that is stored on the graphics card. You can always choose "File/Add overlay" instead of "Draw/OpenVOI" to view a drawing as a static volume that will appear in both 2D slices and the 3D rendering.Jul 6, 2022 02:07 AM | Daniel CorpRE: Cannot change overlay color of DTI nii.gzI had this problem - adding it as an overlay doesn't help, and that's what you said you were doing anyway it seems - looks like its because there are voxels outside of the brain in your overlap image. Mask it to a standard brain mask by: fslmaths MNI152_T1_2mm_brain_mask.nii.gz -mul CombLesionMap.nii.gz CombLesionMapMasked.nii.gz
(i.e. masked binarised standard brain file - your lesion file - name for new masked file). Then reload your new masked lesion map into MRIcroGL and it should allow you to change the overlay colour.- Jul 6, 2022 11:07 PM | Daniel CorpRE: Cannot change overlay color of DTI nii.gzOriginally posted by Daniel Corp:I had this problem - adding it as an overlay doesn't help, and that's what you said you were doing anyway it seems - looks like its because there are voxels outside of the brain in your overlap image. Mask it to a standard brain mask by: fslmaths MNI152_T1_2mm_brain_mask.nii.gz -mul CombLesionMap.nii.gz CombLesionMapMasked.nii.gz
(i.e. masked binarised standard brain file - your lesion file - name for new masked file). Then reload your new masked lesion map into MRIcroGL and it should allow you to change the overlay colour.
Here is a lesion map with voxels outside the brain. This doesn't let you change the colour of the overlap.Attachment: CombLesionMap.nii.gz- Jul 6, 2022 11:07 PM | Daniel CorpRE: Cannot change overlay color of DTI nii.gzOriginally posted by Daniel Corp:Originally posted by Daniel Corp:I had this problem - adding it as an overlay doesn't help, and that's what you said you were doing anyway it seems - looks like its because there are voxels outside of the brain in your overlap image. Mask it to a standard brain mask by: fslmaths MNI152_T1_2mm_brain_mask.nii.gz -mul CombLesionMap.nii.gz CombLesionMapMasked.nii.gz
(i.e. masked binarised standard brain file - your lesion file - name for new masked file). Then reload your new masked lesion map into MRIcroGL and it should allow you to change the overlay colour.
Here is a lesion map with voxels outside the brain. This doesn't let you change the colour of the overlap.
Here is the same map masked using the fslmaths command above.Attachment: CombLesionMapMasked.nii.gz
Jul 7, 2022 10:07 AM | Chris RordenRE: Cannot change overlay color of DTI nii.gzDaniel,
The issue you are experiencing reflects the fact that your image has the "Label" intent code, which suggests that the different values reflect discrete regions rather than scalar values. For example, consider the partial volume effect of a voxel that contains a proportion of Brodmann Area 19 and some portion of area 17 - in this case it would be incorrect to infer that this voxel is area 18. You can fix the issue by opening your header in MRIcroGL and setting the intention to "Not statistics". Your masking operation stripped the intention code, so that changed MRIcroGL's behavior to treat the new image as scalar values.
fslhd CombLesionMap
...
intent Label index
intent_code 1002Attachment: gl.png- Jul 11, 2022 04:07 AM | Daniel CorpRE: Cannot change overlay color of DTI nii.gzThanks Chris, appreciate it.
- Jul 3, 2022 09:07 PM | Fabien RechoverlapHi Chris,
thank you very much for this software.
I have 32 masks I want to overlap. They are "in theory" binarized as they have been segmented in ITKSnap.
They have been normalized in spm12. Everything looks fine after normalization.
I performed an overlap with MRICroGL and it looks well (intensity voxel range is from 0 to 32 max)
However I tried to do the same thing in Python (because I want to do other calculation than a "simple" sum") and I have slightly different results.
Indeed, some voxels have intensity up to 34 or 36 which would be impossible as I performed a sum of the intensity for each 32 voxels (whose intensity is normally 0 or 1).
After exploring the file in Python, I found some maskes with few voxels having intensity of 2.
When I "filter" with the intensity range tool I did not see any voxel whose intensity is superior to 1 with "load smooth overaly" but I found a voxel with an intensity of 2 when I uncheck 'load smooth overlay" so I began to understand the problem.
Then I decided to set everything positive voxel intensity to 1 and it's working (sum of voxel intensity is not superior to the number of mask)
However my overlap map voxel do not have an intensity represented as an integer (from 0 to 32) but as a float with for example 23.86 instead of 24. So I have few questions :
1/does MRICroGL smooth the VOI before performing overlap (because intensity voxel range is from 0 to 32 without any manipulation of me) ?
2/have you any idea of the reason why I got some float with decimals although I performed a sum with integer ?
3/ do you have an idea why with a segmentation I got some voxels with a value of 2 ? Do you think it might be a result from the normalization process ? (I did not find the voxel with 2 intensity in my raw mask before normalization)
Thank you very much for your answer
Best regards- Jul 4, 2022 12:07 PM | Chris RordenRE: overlapHard to answer this without seeing the files.
1. When you load images with smoothing, you can get partial volume effects if the images are not perfectly aligned. This can yield non-integer results from an input of integers.
2. A normalization process applied to a map of zeros and ones could in theory create voxels with values larger than 1 if depending on modulation
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=spm;fbfca96e.1510
interpolation other than nearest neighbor will yield values between zero and one due to partial volume effects.
3. Since you plan to use Python, you may want to post a message on neurostars - my Python skills and knowledge of nibabel are pretty rudimentary.- Jul 4, 2022 12:07 PM | Fabien RechRE: overlapThank you for your answer,
I can give you the file.
There is no problem with smoothing in MRICroGL.
There is also no problem with the overlap method that’s why I was wondering how the program was performing the operation : is it a simple sum of intensity for each vowel or does it perform other operation ? Interestingly MRIcroGL gives me good results with bad map…
I will post on neuro stars but every information about the method you use in MRIcroGL would be helpful to understand the difference with Python functions.