Dear experts,
I am having trouble using --init-reg option in bbregister (FreeSurfer v6 beta version). It exits with error: must supply subject id.
My command line is:
bbregister --mov my_moveable.nii.gz --s my_subject_id --lta my_lta_out.lta --dti --init-reg my_initial_lta.lta
I traced the problem to reg2subject --r my_initial_lta.lta which is executed inside bbregister. This script returns empty string. By examining reg2subject code, it in case of .lta searches for string "subject" in lta file. However there is no such string in my .lta.
My .lta file was created by tkregister2 by conversion from fsl .mat file (without specification of subject) by command:
tkregister2 --mov mov.nii.gz --targ targ.nii.gz --ltaout mov2targ.lta --fsl mov2targ.mat --reg /tmp/junk --noedit
where mov2targ.mat is vox2vox fsl-style matrix encoding transformation from mov.nii.gz to targ.nii.gz. I checked validity of produced .lta file by tkregister2 and it looks OK.
The straightforward remedy in my case possibly would be to remove reg2subject invocation from bbregister (since I am already providing the subject by --s option), or add subject id to .lta.
General solution in bbregister code would possibly be to provide test whether subject id is specified and in case it is not, then read the subject id from registration file. Or read both and in case of non-empty return of reg2subject, then compare obtained subject id with subject id supplied by --s and in case of different strings, produce a warning and use one of them (--s would take precedence?).
My second inquiry is following: My idea was to do the registration in 3 stages: provide rough alignment with .lta, then mri_coreg (or fsl-flirt) and then bb-registration. My experience is, that in some situations when the images are very differently aligned, the --init-fsl totally fails.
Is it possible to realize it by supplying both --init-reg and --init-coreg (or even combination of --init-reg --init-best to try both mri_coreg and flirt)?
Regards,
Antonin Skoch