Hi,
If this is really a question about flirt then it is simple.
It is the reference image that controls the size of the
output (both number of voxels and mm size of the voxels).
So what you want to do is get your matrix from the flirt
call you are already doing (using the -omat command)
and then apply this in a separate flirt call using -applyxfm
but using a different reference image. When you use
the -applyxfm option (with the -init option specifying the
matrix) it just resamples the image and does not use
the intensities of the reference image, but does use it
to calculate the size. So you just want to pass it a
reference image that has your desired voxel size and
FOV. You can make such an image using fslcreatehd.
There are more details about how this all works in the
FSL course practical if you are not clear about this.
All the best,
Mark
Mark Schira wrote:
>> Is this for a purpose other than running FIRST? If not, the models are
>> still fit in the native space (it transforms the model, not the image).
>>
> Yes, I want the images to transformed for some other purpose (not FIRST) - I
> want to run FLIRT in another step, too - but thats a different story...
>
>
> @wolf
> I tried your suggestion, but that didn't change the resampling to 1mm
> Maybe upsampling the model to 0.75mm will do the trick?
> -interp sinc makes the IQ slighly better, but not by much. Still not very
> satisfactory
>
> Cheers
>
>
>
>
>>>> Hi Mark,
>>>>
>>>> You might modify the script (/usr/local/fsl/bin/first_flirt) to
>>>> achieve this. In line 130 there is a final flirt call to apply the
>>>> transformation:
>>>> ${FSLDIR}/bin/flirt -in ${A} -out ${B} -ref ${FSLDIR}/data/standard/$
>>>> {refim} -applyxfm -init ${B}_cort.mat
>>>>
>>>> If you change it to
>>>> ${FSLDIR}/bin/flirt -in ${A} -out ${B} -ref ${A} -applyxfm -init $
>>>> {B}_cort.mat
>>>>
>>>> I guess this could do the trick. Another option might be to change
>>>> the reference image (line 90: refim=MNI152_T1_1mm) and use one that
>>>> you created for your purpose. However, you still might notice a
>>>> degradation of the image quality that is due to the interpolation
>>>> (add '-interp sinc' to the last flirt call to whether it improves).
>>>>
>>>> good luck,
>>>> wolf
>>>>
>>>> Mark Schira wrote:
>>>>
>>>>> Hi
>>>>> I ma trying to use the first_flirt script to rotate anatomy scans
>>>>> into a
>>>>> standard space.
>>>>> first_flirt seems to do the job, however it also resizes the images
>>>>> into a
>>>>> standard resolution of 1x1x1 mm, thereby significantly reducing the
>>>>> quality
>>>>> of the data, which is in 0.75mm. (The reduction of quality is
>>>>> rather dramatic!).
>>>>>
>>>>> So in other words I want to do exactly what first_flirt does, but
>>>>> without
>>>>> resizing to 1mm, but instead simply applying a rotation and
>>>>> translation.
>>>>> I looked hard but I couldn't identify an option for this, nor could
>>>>> I see
>>>>> where in the first_flirt script i would have to make the changes...
>>>>> Cheers
>>>>> M.
>>>>>
>>>>>
>>> ---------------------------------------------------------------------------
>>> Stephen M. Smith, Professor of Biomedical Engineering
>>> Associate Director, Oxford University FMRIB Centre
>>>
>>> FMRIB, JR Hospital, Headington, Oxford OX3 9DU, UK
>>> +44 (0) 1865 222726 (fax 222717)
>>> [log in to unmask] http://www.fmrib.ox.ac.uk/~steve
>>> ---------------------------------------------------------------------------
>>>
>>>
>>>
>
>
|