Hi,
I just thought I'd clarify the point about the NIFTI header a little.
In FSL we do not, by default, use the full information about the NIFTI coordinate system (the qform and sform) but we _always_ preserve this information, transform it appropriately, and write it out. Furthermore, we do use the sign of the determinant of these matrices in order to determine the left/right order, and this is crucial. These matrices are not transformation matrices per se, but descriptions of coordinate systems and the qform usually contains the relationship between the voxel coordinates and the scanner coordinates. Almost all programs that create NIFTI files from other formats, such as DICOM, will populate the qform (and/or sform) with appropriate information. Whether this is useful for registration depends on if the scans are from the same session and the subject has not moved very much. Because the latter is not always known, we do not use the qform/sform by default and do not recommend it in all cases. However, for scans from the same session it can be useful as an initialisation.
So, in summary, we do write this section on the NIFTI. We also rely upon the determinants. It is the DICOM to NIFTI conversion tools (or similar) that write the useful information into here. For registration, it can be useful as an initialisation if the scans are from the same session and there was no repositioning of the subject.
All the best,
Mark
On 4 Jun 2013, at 13:09, Benjamin Kay <[log in to unmask]> wrote:
> On Tuesday, June 04, 2013 05:30:24 you wrote:
>> Hi
>> i want to compute the linear transform between the diffusion space and my seed space which is freesurfer space (brain.mgz converted into nifti), my script is :
>>
>> flirt -in ~/dti50.bedpostX/nodif_brain -ref ~/ctr1_brain.nii.gz -omat /~dti50.bedpostX/xfms/diff2str.mat -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -dof 12 -cost corratio
>>
>> is it necessary to use 12 dof
>
> It sounds like you're going from one space/modality to another with the same brain. In that case, a 6 (rigid-body) or 7 (rigid-body + global scale) dof transform might be enough. Try it and see what works best for you.
>
>> and should i add the -usesqform option ?
>
> The NIFTI file format lets programs store transformation matrices in the NIFTI header. This helps to avoid multiple resampling and the accompanying artifacts. To my limited knowledge, fsl does not write to this section of the header. But if your NIFTI file came from a different program that uses this header (e.g. SPM), then you can to tell flirt to use that transformation matrix witht the -usesqform option.
|