Dear FreeSurfer team,
I'm doing a structural analysis with 50 MS patients and 50 healthy controls (T1, T2 and FLAIR). The MS patients have multiple lesions mainly in white matter. My co-worker did manual editing (bullet points) in the FLAIR images, and i would like to use these edits when running recon-all in order to avoid further manual editing.
Steps in analysis:
1) First steps of recon-all:
recon-all -autorecon1 -autorecon2
2) Reslicing the FLAIR images:
The aseg.auto.mgz (256x256x256) didn't have the same size as the FLAIR (resliced to 1mm, co-registered in MNI-space and with manually drawn binary lesion masks (218x182x182)). I overcome this problem by reslicing the FLAIR images using aseg.auto.nii as the image defining space. This was done in SPM8, and prior to this the aseg.auto.mgz was converted to a .nii using mri_convert.
3) Insert lesions from the resliced FLAIR images to aseg.mgz:
aseg = MRIread('aseg.auto.mgz'); % FreeSurfer aseg
manlesion = MRIread('manlesion.nii.gz'); % Manual lesion, whatever format, but should be binary
ind = find( (aseg.vol == 2 | aseg.vol == 41) & manlesion.vol ~= 0);
newaseg = aseg;
newaseg.vol(ind) = 77;
MRIwrite(newaseg,'aseg.mgz'); % This will overwrite the aseg.mgz, so make a backup
4) The last steps of recon-all:
recon- all -autorecon2-cp -autorecon3
When running the following command i get this error:
/depot64/freesurfer/freesurfer.5.3.0/bin/recon-all -s 01MS -autorecon2-cp -autorecon3 subjid 01MS
............
'#@# Intensity Normalization2 Mon Aug DATE /.../subjects_FLAIR/01MS/mri
mri_normalize -aseg aseg.mgz -mask brainmask.mgz norm.mgz brain.mgz
using segmentation for initial intensity normalization using MR volume brainmask.mgz to mask input volume... reading from norm.mgz... Reading aseg aseg.mgz normalizing image... processing with aseg removing outliers in the aseg WM... 5361 control points removed Building bias image mriMarkUnmarkedNeighbors: all inputs must be MRI_UCHAR or MRI_INT building Voronoi diagram... Numerical argument out of domain Linux big28 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s 01MS exited with ERRORS at Mon Aug 8 15:31:32 CEST 2016
The lesions looks alright (as if they are in the right place). Do you have any suggestions what to do if they are not? And what could be the problem if they are placed correctly?
What is the advantage of starting by running autorecon-1 and 2 and then inserting the lesions from the FLAIR?
Thanks a lot for all your help!
Best, Silas