Error when loading binary mask

60 views
Skip to first unread message

quentin devignes

unread,
Dec 8, 2022, 5:35:37 PM12/8/22
to DSI Studio
Good afternoon, 

I successfully ran the preprocessing steps and the reconstruction (GQI) on our subjects, but I ran into an error when trying to load my ROI. Here is my process:
- For each subject, we have a T1 and a partial T2 TSE
- I used the hippocampal subfield segmentation script from Freesurfer on the T1 + partial T2 (to improve the segmentation) (Freesurfer registers the T2 on the T1 before segmenting)
- Then, I created a binary mask of the anterior hippocampus by combining different subfields from the Freesurfer output with the mri_binarize function
- Finally, in DSI GUI, I tried to load the binary mask using Regions >> Open region, but got the following error message: "Cannot align ROI file with DWI.Please insert its reference T1W/T2W using [Slices][Insert T1WT2W] to guide the registration."
- So, I inserted the T1 of my subject and tried to load the region again, but I got the same error message. I also tried with the T2, but in vain.

I don't understand what is happening. It is the first time I am using DSI and everything went well until the ROI loading step. 

Would you have any advice on how to proceed?

Thank you,

Quentin 

Fang-Cheng Yeh

unread,
Dec 8, 2022, 5:41:51 PM12/8/22
to dsi-s...@googlegroups.com
Could you check the image dimension of the ROI, T1W, and T2W images?
You may use [Tools][O1: View Image] to get the image dimension.
Likely that the ROI was generated in the MNI space and it will have a
different dimension.

Best,
Frank
> --
> You received this message because you are subscribed to the Google Groups "DSI Studio" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/0695e2e9-5950-4e5e-82eb-c889f5343a9en%40googlegroups.com.

quentin devignes

unread,
Dec 9, 2022, 10:47:35 AM12/9/22
to DSI Studio
Hi Frank, 

Thank you for your reply.

Here are the dimensions of the different sequences:
T1: 208;300;320
T2: 384;384;30
ROI: 357;281;181

Best, 
Quentin 

Fang-Cheng Yeh

unread,
Dec 9, 2022, 11:54:57 AM12/9/22
to dsi-s...@googlegroups.com
The ROI needs to have the same dimension as the T1W or T2W images.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dsi-studio/094f4e36-e419-4768-b70d-186172c0f0abn%40googlegroups.com.

quentin devignes

unread,
Dec 9, 2022, 5:42:05 PM12/9/22
to DSI Studio

Thanks for the reply. I generated my ROIs in the Freesurfer voxel space, and I am now able to load them along with the T1 (automatically registered in the FS voxel space when running recon-all). 

Best,
Quentin 

Nicholas Bustos

unread,
Oct 8, 2024, 3:21:26 PM10/8/24
to DSI Studio
Hi,

I am also trying to extract metrics from FreeSurfers Hippocampal subfield segmentation. 

I followed advice above and plugged in the voxel space (after mri_convert to nii), it completes successfully but not sure as i intend, bc it does give message: 

| | | rh has a different dimension from the FIB file. need transformation or warpping.

| | | assuming rh is in the template space (please check)

| | | applying rh's header srow matrix to align.


Can you advise the proper route ? 
(ie - what to warp and where)

Thanks
NB

dsi_studio --action=ana --source=sub-marscombo187531p.nii.gz.src.gz.odf.icbm152_adult.qsdr.1.25.R73.fib.gz --regions=rh.hippoAmygLabels-T1.v22.HBT.FSvoxelSpace.nii.gz --t1t2=norm.nii.gz

---------------------------------

+ DSI Studio version: Chen"陳" command line

| DSI Studio version: Chen"陳"

| action=ana

| source=sub-marscombo187531p.nii.gz.src.gz.odf.icbm152_adult.qsdr.1.25.R73.fib.gz

| + run ana

| | loading sub-marscombo187531p.nii.gz.src.gz.odf.icbm152_adult.qsdr.1.25.R73.fib.gz...

| | + open FIB file

| | | using index file for accelerated loading:sub-marscombo187531p.nii.gz.src.gz.odf.icbm152_adult.qsdr.1.25.R73.fib.gz.idx

| | | + opening sub-marscombo187531p.nii.gz.src.gz.odf.icbm152_adult.qsdr.1.25.R73.fib.gz

| | | |_133 ms

| | | + loading fiber and image data

| | | | + loading image volumes

| | | | |_5 ms

| | | | + initiating data

| | | | | matched template: /Applications/dsi_studio.app/Contents/MacOS/atlas/ICBM152_adult/ICBM152_adult.QA.nii.gz

| | | | |_1 ms

| | | |_6 ms

| | | FIB file loaded

| | |_142 ms

| | regions=rh.hippoAmygLabels-T1.v22.HBT.FSvoxelSpace.nii.gz

| | t1t2=norm.nii.gz

| | + opening norm.nii.gz

| | |_0 ms

| | + reading image data

| | |_33 ms

| | add new slices: norm

| | registeration complete

| | 1.91966e-37 3.44383e-41 2.61771e-23 0

| | 8.57821e+16 4.59065e-41 5.38673e-38 0

| | 1.35926e-43 0 7.9874e-44 0

| | T1T2 dimension: (256,256,256)

| | T1T2 voxel size: 1 1 1 

| | + load NIFTI file

| | | + opening rh.hippoAmygLabels-T1.v22.HBT.FSvoxelSpace.nii.gz

| | | |_1 ms

| | | + reading image data

| | | |_75 ms

| | | rh loaded as multiple ROI file

| | | looking for region label file

| | | no label file found. Use default ROI numbering.

| | | FIB file dimension: (78,94,68) voxel size: 2 2 2 

| | | FIB file native-space dimension: (120,120,72)

| | | rh dimension: (256,256,256) voxel size: 1 1 1 

| | | rh has a different dimension from the FIB file. need transformation or warpping.

| | | assuming rh is in the template space (please check)

| | | applying rh's header srow matrix to align.

| | | region dimension: (256,256,256)

| | | region voxel size: 1 1 1 

| | | region voxel count: 623

| | | region dimension: (256,256,256)

| | | region voxel size: 1 1 1 



Frank Yeh

unread,
Oct 8, 2024, 3:34:28 PM10/8/24
to nbust...@gmail.com, DSI Studio
The FIB file was created using QSDR and thus all NIFTI files need to be in the ICBM152 2009a space.
The best way to check is using GUI to see if the loaded region aligned well.

Best,
Frank

Reply all
Reply to author
Forward
0 new messages