help > Error During Normalization Step in CONN: Potential Issue with Custom Lesion Mask TPM
Sep 13, 2024  11:09 PM | jimark
Error During Normalization Step in CONN: Potential Issue with Custom Lesion Mask TPM

I am experiencing an issue during the normalization step while using CONN, specifically during the "Normalise: Estimate & Write" process. The error occurs when SPM is attempting to normalize functional images, and the process fails with the following error message:


```


failed: Normalise: Estimate & WriteError using sqrtm


(line 44)Matrix elements must be finite.


In file "/path/to/matlab/matfun/sqrtm.m" (???),%20function%20%22sqrtm%22%20at%20line%2044.


```


I am preprocessing fMRI and anatomical data with CONN, and I am using a custom lesion mask TPM for the normalization process. The error seems to occur specifically when this lesion mask is used during the affine registration step. Below is the relevant data that is fed into the pipeline where the error occurs:


Functional images:
/path-to-data/sub-23/func/art_mean_ausub-23_rest_bold.nii


Lesion mask used:
/path-to-data/sub-23/lesion/sub-23_lesion_mask_reslice.nii (Note I have resliced the lesion masks to the T1 scans using spm prior to porting them into conn)


Troubleshooting Steps:
Matrix Check: I have checked the functional image for NaN or Inf values using MATLABs spm_vol and spm_read_vols, and confirmed that the image does not contain any non-finite values.


Lesion Mask: I have also checked the custom lesion mask used in the normalization step and confirmed that it does not contain NaN or Inf values.


Voxel Sizes and Alignment: The functional and anatomical images have different voxel sizes ([86, 86, 32] for functional, [256, 256, 160] for anatomical), but they are aligned properly during the coregistration step. The error seems to occur during the affine registration process (affreg set to 'mni' or 'subj').


I would greatly appreciate any guidance on resolving this issue, particularly in relation to the use of custom TPMs during normalization. I currently have the lesions uploaded as a secondary datset. Are there specific recommendations or modifications that should be made when using a custom lesion mask for normalization in CONN?


 


 

Threaded View

TitleAuthorDate
Error During Normalization Step in CONN: Potential Issue with Custom Lesion Mask TPM
jimark Sep 13, 2024
jimark Sep 15, 2024