Options when subjects fail in crop_aladin stage
Inspired from subject sub-032159 in site-mountsinai-S from PRIME-DE, which fail miserably since the first step of macapype.
Here is for instance the image after the first stage:

- option 1
-- Prepare the data with FSL-FAST:
fast -l 8 -B sub-032159_ses-001_run-1_T1w.nii.gz-- Apply thereg_aladincommand used in macapype to the bias corrected image:
reg_aladin -aff sub-032159_ses-001_run-1_T1w_aff.txt -flo sub-032159_ses-001_run-1_T1w_restore.nii.gz -ln 12 -lp 10 -nac -noSym -omp 1 -ref /Users/jsein/Documents/Centre_IRMf/DATA/BIDS/Covoprim/inia19-t1.nii -res sub-032159_ses-001_run-1_T1w_restore_res.nii.gz -rigOnly -smooR 1.000000
-- Apply the calculated transform to the original image
reg_resample -flo sub-032159_ses-001_run-1_T1w.nii.gz -ref /Users/jsein/Documents/Centre_IRMf/DATA/BIDS/Covoprim/inia19-t1.nii -res test.nii.gz -trans sub-032159_ses-001_run-1_T1w_aff.tx
This is the result:

- option 2 (much faster)
-- change the parameters of
reg_aladinon the original image:
reg_aladin -aff sub-032159_ses-001_run-1_T1w_aff.txt -flo sub-032159_ses-001_run-1_T1w.nii.gz -ln 8 -lp 10 -nac -noSym -omp 1 -ref /Users/jsein/Documents/Centre_IRMf/DATA/BIDS/Covoprim/inia19-t1.nii -res sub-032159_ses-001_run-1_T1w_res.nii.gz -rigOnly -smooR 1.000000
=> same result
With a little more exploration, using sites ucdavis and mount sinai-S, I had to choose between two sets of parameters for reg_aladin: (with ref inia19)
-
reg_aladin -ln 12 -lp 10 -nac -noSym -omp 1 -ref -rigOnly -smooR 1=> works for all subjects of ucdavis and all but two subjects of mount sinai-S -
reg_aladin -ln 5 -lp 10 -nac -noSym -omp 1 -ref -rigOnly -smooR 1=> works for all subjects of ucdavis, mount sinai-S ( even for the two subjects of mount sinai-S that weren't working)
For INT macaques, option worked for all the one I tried, except Galileo, which needed to be cropped before and use of option 1.