help > How to transform a subset of MNI-space first-level maps to native space for each subject?
Showing 1-9 of 9 posts
Display:
Results per page:
Aug 3, 2018  10:08 AM | fred Sampedro
How to transform a subset of MNI-space first-level maps to native space for each subject?
Dear CONN experts,

I have preprocessed all my subjects in CONN v18 in MNI space. Now, I would like to convert the resulting MNI-space seed-to-voxel and ICA maps for each subject to native space, in order to subsequently co-register them with their associated structural T1MRI images and compute some specific properties on hand-drawn ROIs (specific to each subject). I am aware that CONN allows to do the preprocessing in native space, but I would like to avoid doing this if possible.

Could you please guide me on finding the appropriate SPM12 commands to convert the CONN first-level MNI-space maps to native-space for each subject?

Thanks a lot!
Aug 3, 2018  12:08 PM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: How to transform a subset of MNI-space first-level maps to native space for each subject?
Hi,

A usual rule of thumb for converting data from MNI space to native space is to use the inverse deformation field. When performing the segmentation steps, SPM will write out the forward and the reverse deformation fields (by default they are turned off; you need to select whether you want to save them or not). When running the preprocessing steps in Conn, Conn saves both these fields for you (the forward deformation is the y_*.nii and the inverse deformation is the iy_*.nii file).

You can run the normalization step (Normalize: Write) in SPM and specify the deformation field as the iy_*.nii file and select the images in MNI space (that you want to convert to native space) as the images that you want to write. Be sure to specify the correct values for voxel size and the bounding box (as per your native space file). If you set the bounding box to NaN(2,3), SPM will figure it out from the specified deformation field.

Hope that helps

Best
Pravesh
Originally posted by fred Sampedro:
Dear CONN experts,

I have preprocessed all my subjects in CONN v18 in MNI space. Now, I would like to convert the resulting MNI-space seed-to-voxel and ICA maps for each subject to native space, in order to subsequently co-register them with their associated structural T1MRI images and compute some specific properties on hand-drawn ROIs (specific to each subject). I am aware that CONN allows to do the preprocessing in native space, but I would like to avoid doing this if possible.

Could you please guide me on finding the appropriate SPM12 commands to convert the CONN first-level MNI-space maps to native-space for each subject?

Thanks a lot!
Jun 19, 2019  01:06 PM | Stefan Katletz
RE: How to transform a subset of MNI-space first-level maps to native space for each subject?
Hi,

I ran into the same problem, and no matter what I try, it doesn't seem to work in SPM12. Here is what I did:

1. T1 image segmented using "Segmentation" and the TPM.nii. Output is in native space, besides the c1-c5 maps I also generated the deformation fields (y_ and the inverse iy_).

2. When I use "Normalise (Write)" with a label map in MNI space (e.g. labels_Neuromorphometrics.nii) and the inverse deformation field, I end up with a volume which is not really registered with the original T1 image.

Can anybody point me to some recipe how to transform MNI to native space with the deformation fields from the segmentation process?

Thanks,
Stefan
 
Originally posted by Pravesh Parekh:
Hi,

A usual rule of thumb for converting data from MNI space to native space is to use the inverse deformation field. When performing the segmentation steps, SPM will write out the forward and the reverse deformation fields (by default they are turned off; you need to select whether you want to save them or not). When running the preprocessing steps in Conn, Conn saves both these fields for you (the forward deformation is the y_*.nii and the inverse deformation is the iy_*.nii file).

You can run the normalization step (Normalize: Write) in SPM and specify the deformation field as the iy_*.nii file and select the images in MNI space (that you want to convert to native space) as the images that you want to write. Be sure to specify the correct values for voxel size and the bounding box (as per your native space file). If you set the bounding box to NaN(2,3), SPM will figure it out from the specified deformation field.

Hope that helps

Best
Pravesh
Jun 19, 2019  01:06 PM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: How to transform a subset of MNI-space first-level maps to native space for each subject?
Hi Stefan,

Can you tell me what did you specify in the bounding box and voxel size fields? Its usually best to let SPM figure out the correct bounding box by specifying Nan(2,3) in that field. Also, do mention the correct voxel size (the same size as your native space data). Finally, since you are transforming an atlas file, use the nearest neighbour interpolation method.


Best
Pravesh


Originally posted by Stefan Katletz:
Hi,

I ran into the same problem, and no matter what I try, it doesn't seem to work in SPM12. Here is what I did:

1. T1 image segmented using "Segmentation" and the TPM.nii. Output is in native space, besides the c1-c5 maps I also generated the deformation fields (y_ and the inverse iy_).

2. When I use "Normalise (Write)" with a label map in MNI space (e.g. labels_Neuromorphometrics.nii) and the inverse deformation field, I end up with a volume which is not really registered with the original T1 image.

Can anybody point me to some recipe how to transform MNI to native space with the deformation fields from the segmentation process?

Thanks,
Stefan
 
Originally posted by Pravesh Parekh:
Hi,

A usual rule of thumb for converting data from MNI space to native space is to use the inverse deformation field. When performing the segmentation steps, SPM will write out the forward and the reverse deformation fields (by default they are turned off; you need to select whether you want to save them or not). When running the preprocessing steps in Conn, Conn saves both these fields for you (the forward deformation is the y_*.nii and the inverse deformation is the iy_*.nii file).

You can run the normalization step (Normalize: Write) in SPM and specify the deformation field as the iy_*.nii file and select the images in MNI space (that you want to convert to native space) as the images that you want to write. Be sure to specify the correct values for voxel size and the bounding box (as per your native space file). If you set the bounding box to NaN(2,3), SPM will figure it out from the specified deformation field.

Hope that helps

Best
Pravesh
Jun 21, 2019  08:06 AM | Stefan Katletz
RE: How to transform a subset of MNI-space first-level maps to native space for each subject?
Hi Pravesh, 

thanks for your help.
For the bounding box I used your suggestion (NaN(2,3)), I set the voxel size to [1 1 1] (like in the native T1 image). I also tried with Nearest Neighbour (and also a couple of others). Still I don't get the label map correctly transformed into the native space (see screenshot).

I am using SPM12 (latest version 7487).

Is there anything I can do with the _seg8.mat file I get from segmentation?

If this is working for the rest of you, something must be wrong with my T1. On the other hand, the results from segmentation look fine.

Cheers,
Stefan
Originally posted by Pravesh Parekh:
Can you tell me what did you specify in the bounding box and voxel size fields? Its usually best to let SPM figure out the correct bounding box by specifying Nan(2,3) in that field. Also, do mention the correct voxel size (the same size as your native space data). Finally, since you are transforming an atlas file, use the nearest neighbour interpolation method.


Best
Pravesh
Attachment: spm_unnormalize.jpg
Jun 21, 2019  09:06 AM | Stefan Katletz
RE: How to transform a subset of MNI-space first-level maps to native space for each subject?
Bugger, mea culpa.

The TPM and labels_neuromorphometrics are not aligned, see screenshot.

I was assuming they are all in MNI space. Assumption is the mother of all f* ups.

Stefan

EDIT: The final result is quite reasonable, only left and right is mixed up, of course.

Originally posted by Stefan Katletz:
If this is working for the rest of you, something must be wrong with my T1. On the other hand, the results from segmentation look fine.
Attachment: TPM_neuromorpho.jpg
Jun 21, 2019  12:06 PM | Stefan Katletz
RE: How to transform a subset of MNI-space first-level maps to native space for each subject?
Here is the finally labeled brain in natvie space.

Thanks for sharing the instructions.
Stefan
Jun 24, 2019  09:06 AM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: How to transform a subset of MNI-space first-level maps to native space for each subject?
Hi Stefan,

The TPM and labels_Neuromorphometrics images are both in the MNI space and are aligned to each other. Something seems to be wrong with the overlay screenshot that you shared. Are you using the same TPM that comes with SPM (12?) or is this some custom TPM? I just segmented a T1w image and passed the inverse deformation field to the normalization step; the resulting un-normalized (native space) labels_Neuromorphometrics image looks absolutely fine and is perfectly aligned too. If its not working out for you, perhaps you could share your T1w image?


Best
Pravesh


Originally posted by Stefan Katletz:
Here is the finally labeled brain in natvie space.

Thanks for sharing the instructions.
Stefan
Jun 25, 2019  12:06 PM | Stefan Katletz
RE: How to transform a subset of MNI-space first-level maps to native space for each subject?
Hi Pravesh,

I used the images (TPM and labels_Neuromorphometrics) from spm12 (tpm folder). I redid all my steps to find out what is going wrong and I think I found the culprit.

It seems that when I change the header of labels_Neuromorphometrics (Statistics/Intention -> Labels, Optional/Regular -> 98, then save header in order to see the label names in the overlay) the volume is slightly shifted. I did this before the un-normalization, which made the effect even worse. Changing the header after un-normalization, the shift is also noticable but not so bad.

Without modifying the header the match is near perfect. Is this a bug in mricron? After all, I didn't change the values in the Dimensions or Reorient tabs.

Stefan
Originally posted by Pravesh Parekh:
Hi Stefan,

The TPM and labels_Neuromorphometrics images are both in the MNI space and are aligned to each other. Something seems to be wrong with the overlay screenshot that you shared. Are you using the same TPM that comes with SPM (12?) or is this some custom TPM? I just segmented a T1w image and passed the inverse deformation field to the normalization step; the resulting un-normalized (native space) labels_Neuromorphometrics image looks absolutely fine and is perfectly aligned too. If its not working out for you, perhaps you could share your T1w image?


Best
Pravesh


Originally posted by Stefan Katletz:
Here is the finally labeled brain in natvie space.

Thanks for sharing the instructions.
Stefan