External Email - Use Caution Hi Freesurfer experts,
I have been trying to run a registration between my DWi data and the T1. I am struggling to obtain a good cortical matching, despite I have previously run it withour problems in other datasets. The mincost for most of the individuals is >0.8, which is pretty bad. My guess is that there is a problem with the initialization (mri_coreg not converging correctly?). I have tried different approaches to improve the results with no success: 1) Typical bbregister command: >> bbregister --s XX --mov XX_b0_brain.nii.gz --reg dwi2anat.reg.lta --dti 2) Initialize with fsl (using --init-fsl and using flirt independently with mutual information cost) 3) Playing around with mri_coreg different parameters (dof, non-mask, different smooth of target/mov, etc). 4) Use bbregister with the pial surface (since the contrast CSF/GM is higher than GM/WM) with the command: >> bbregister --s XX --mov 'XX_b0_brain.nii.gz' --reg reg.csf.gm.contrast.dat --surf pial --o dwi2anat.nii.gz --t1 --gm-proj-abs 1 --wm-proj-abs 1 Any insight on how to improve the results? Victor Montal PS: Please, see below the output of mri_coreg when initializing the bbregister with default parameters (method1): $Id: bbregister,v 1.75 2016/05/10 20:02:28 greve Exp $ Linux testPC 4.15.0-64-generic #73~16.04.1-Ubuntu SMP Fri Sep 13 09:56:18 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux FREESURFER_HOME /usr/local/freesurfer mri_convert XX_b0_brain.nii.gz ./tmp.bbregister.28271/template.nii mri_convert.bin XX_b0_brain.nii.gz ./tmp.bbregister.28271/template.nii $Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $ reading from XX_b0_brain.nii.gz... TR=1000.00, TE=0.00, TI=0.00, flip angle=0.00 i_ras = (-0.998604, 0.0523657, -0.00685515) j_ras = (0.0495749, 0.974205, 0.220152) k_ras = (-0.0182067, -0.219505, 0.975442) writing to ./tmp.bbregister.28271/template.nii... mri_coreg --s XX --mov ./tmp.bbregister.28271/template.nii --regdat ./tmp.bbregister.28271/reg.init.dat --reg ./tmp.bbregister.28271/mri_coreg.lta --nthreads 1 --dof 6 --sep 4 --ftol .0001 --linmintol .01 $Id: mri_coreg.c,v 1.27 2016/04/30 15:11:49 greve Exp $ cwd /home/testPC/Desktop/tmp/todel_max/test_subject/DTI/XX cmdline mri_coreg --s XX --mov ./tmp.bbregister.28271/template.nii --regdat ./tmp.bbregister.28271/reg.init.dat --reg ./tmp.bbregister.28271/mri_coreg.lta --nthreads 1 --dof 6 --sep 4 --ftol .0001 --linmintol .01 sysname Linux hostname testPC machine x86_64 user testPC dof 6 nsep 1 cras0 1 ftol 0.000100 linmintol 0.010000 bf 1 bflim 30.000000 bfnsamp 30 SmoothRef 0 SatPct 99.990000 MovOOB 0 optschema 1 Reading in mov ./tmp.bbregister.28271/template.nii Reading in ref /home/testPC/Desktop/tmp/todel_max/test_subject/FS/XX/mri/brainmask.mgz Reading in and applying refmask /home/testPC/Desktop/tmp/todel_max/test_subject/FS/XX/mri/aparc+aseg.mgz Setting cras translation parameters to align centers Creating random numbers for coordinate dithering Performing intensity dithering Initial parameters -0.1963 -2.6892 11.5267 0.0000 0.0000 0.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 Separation list (1): 4 min = 4 DoSmoothing 1 DoCoordDither 1 DoIntensityDither 1 nitersmax 4 ftol 1.000e-04 linmintol 1.000e-02 SatPct 99.990000 Hist FWHM 7.000000 7.000000 nthreads 1 movsat = 1692.0000 mov gstd 1.6917 1.6917 1.6917 Smoothing mov refsat = 116.0000 ref gstd 1.8914 1.8914 1.8914 Smoothing ref COREGpreproc() done Testing if mov and target overlap Init cost -1.0432535803 nhits = 124061 out of 16777216, Percent Overlap: 47.3 Initial RefRAS-to-MovRAS 1.00000 0.00000 0.00000 -0.19633; 0.00000 1.00000 0.00000 -2.68918; 0.00000 0.00000 1.00000 11.52671; 0.00000 0.00000 0.00000 1.00000; Initial RefVox-to-MovVox 0.49930 0.00343 0.02618 -3.93636; -0.02479 -0.11008 0.48710 18.58949; 0.00910 -0.48772 -0.10975 106.51717; 0.00000 0.00000 0.00000 1.00000; sep = 4 ----------------------------------- COREGoptBruteForce() 30 1 30 Turning on MovOOB for BruteForce Search #BF# sep= 4 iter=0 lim=30.0 delta=2.00 -2.19633 7.31082 -4.47329 2.00000 0.00000 4.00000 -1.0498706 Turning MovOOB back off after brute force search --------------------------------- Init Powel Params dof = 6 Starting OpenPowel2(), sep = 4 InitialCost -1.0708609819 #@# 4 188 -2.19633 7.31082 -4.47329 2.00000 0.00000 4.00000 -1.0708610 fs_powell::minimize nparams 6 maxfev 4 ftol 0.000100 linmin_xtol_ 0.010000 powell nthiter 0: fret = -1.070861 #@# 4 190 -1.19633 7.31082 -4.47329 2.00000 0.00000 4.00000 -1.0711184 #@# 4 195 -1.38650 7.31082 -4.47329 2.00000 0.00000 4.00000 -1.0711316 #@# 4 201 -1.38650 5.69279 -4.47329 2.00000 0.00000 4.00000 -1.0721272 #@# 4 202 -1.38650 4.18476 -4.47329 2.00000 0.00000 4.00000 -1.0723432 #@# 4 203 -1.38650 4.46454 -4.47329 2.00000 0.00000 4.00000 -1.0723693 #@# 4 206 -1.38650 4.64374 -4.47329 2.00000 0.00000 4.00000 -1.0723741 #@# 4 207 -1.38650 4.62484 -4.47329 2.00000 0.00000 4.00000 -1.0723747 #@# 4 216 -1.38650 4.62484 -4.34018 2.00000 0.00000 4.00000 -1.0723816 #@# 4 225 -1.38650 4.62484 -4.34018 1.38197 0.00000 4.00000 -1.0724094 #@# 4 237 -1.38650 4.62484 -4.34018 1.38197 -0.28207 4.00000 -1.0724264 #@# 4 238 -1.38650 4.62484 -4.34018 1.38197 -0.29894 4.00000 -1.0724277 #@# 4 251 -1.38650 4.62484 -4.34018 1.38197 -0.29894 3.98803 -1.0724281 powell nthiter 1: fret = -1.072428 #@# 4 283 -1.38650 4.62484 -4.37900 1.38197 -0.29894 3.98803 -1.0724293 #@# 4 292 -1.38650 4.62484 -4.39237 1.46777 -0.29894 3.98803 -1.0724353 #@# 4 303 -1.38650 4.62484 -4.39237 1.46777 -0.35779 3.98803 -1.0724378 Powell done niters total = 1 OptTimeSec 11.2 sec OptTimeMin 0.19 min nEvals 319 Final parameters -1.38650012 4.62484455 -4.39237213 1.46777403 -0.35779098 4.00846672 Final cost -1.072437818483776 --------------------------------- mri_coreg utimesec 72.570349 mri_coreg stimesec 0.163951 mri_coreg ru_maxrss 432564 mri_coreg ru_ixrss 0 mri_coreg ru_idrss 0 mri_coreg ru_isrss 0 mri_coreg ru_minflt 128483 mri_coreg ru_majflt 31 mri_coreg ru_nswap 0 mri_coreg ru_inblock 11360 mri_coreg ru_oublock 16 mri_coreg ru_msgsnd 0 mri_coreg ru_msgrcv 0 mri_coreg ru_nsignals 0 mri_coreg ru_nvcsw 35 mri_coreg ru_nivcsw 3612 Final RefRAS-to-MovRAS 0.99753 0.06990 -0.00624 -1.38650; -0.06972 0.99724 0.02561 4.62484; 0.00802 -0.02512 0.99965 -4.39237; 0.00000 0.00000 0.00000 1.00000; Final RefVox-to-MovVox 0.49992 -0.00036 -0.00871 1.07589; 0.00835 -0.12236 0.48473 17.73093; -0.00248 -0.48480 -0.12233 100.50899; 0.00000 0.00000 0.00000 1.00000; Final parameters -1.3865 4.6248 -4.3924 1.4678 -0.3578 4.0085 nhits = 123915 out of 16777216, Percent Overlap: 47.3 mri_coreg RunTimeSec 72.8 sec _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer