Dear Aran,
SPM will indeed use the sform mapping only (.mat) when saving new files:
https://github.com/spm/spm12/blob/master/spm_preproc_write8.m#L139-L140
You can edit the corresponding line above to use mat0 as well or apply
the change to the header of the images after they have been created.
Could you give more details about the troubles this created for you? Was
it when combined with other software?
Best regards,
Guillaume.
On 28/01/2020 12:46, Aran Garcia wrote:
> Dear SPMers,
>
> we have noticed a behaviour with SPM that has carried some troubles with it
>
> When an image, eg T1, has different qform and sform, and an operation,
> eg segmentation, is run with that image, the output images have equal qform
> and sform.
>
> extop@/11097546$ fslorient -getsform 11097546_T1.nii
> -0.0818971 0.0545198 1.19418 -71.4258 -0.995156 -0.0589635 -0.0944008 122.128 -0.0543885 0.99677 -0.0709015 -51.8805 0 0 0 1
> extop@/11097546$ fslorient -getqform 11097546_T1.nii
> -0.0488498 0.0524169 1.19692 -76.6866 -0.998806 -0.00256364 -0.0585389 151.506 -2.40807e-08 0.998622 -0.0629755 -64.4269 0 0 0 1
> extop@/11097546$ fslorient -getsform c111097546_T1.nii
> -0.0818971 0.0545198 1.19418 -71.4258 -0.995156 -0.0589635 -0.0944008 122.128 -0.0543885 0.99677 -0.0709015 -51.8805 0 0 0 1
> extop@/11097546$ fslorient -getqform c111097546_T1.nii
> -0.0818971 0.0545198 1.19418 -71.4258 -0.995156 -0.0589635 -0.0944008 122.128 -0.0543885 0.99677 -0.0709015 -51.8805 0 0 0 1
>
> We wonder if it would be possible to write in the output images, the original qform.
>
> hope this helps
>
> aran
>
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
UCL Queen Square Institute of Neurology
London WC1N 3BG
|