Hi,
This behaviour is due to the necessity to interpolate the slice positions.
Inevitably the slice ends up somewhere between the integer slice
positions in the other image and then it is a question of what happens
in the slices which only partially overlap. You can control the extent
to which it goes beyond the 100% overlapping region (which would
be 2 slices) by using the -paddingsize option. The default is that it
uses 0, which is your first case, but the -2D option makes it use 1.0
instead which will give you 4 slices. Using 0.5 should give you
3 slices most of the time (except when it is very close to the center
of two slices when rounding errors might make it go either way).
Hope this helps clear up the confusion.
All the best,
Mark
Teemu Rinne wrote:
> Hi,
>
> I am trying to coregister a 3-slice EPI to a low-resolution anatomical
> (t2 flair) image. The anatomical image covers the whole brain and has
> the 3 EPI slices as a subset. Slice thickness is 6 mm in both cases.
>
> Thus, I need a flirt command with Z translation only:
>
> Case 1:
> flirt -in epi_3 -ref T2flair_brain -out epi_3_in_T2flair -schedule
> /usr/local/fsl/etc/flirtsch/ztransonly.sch
> Result: The coregistration (location of slices) is ok but there are
> only 2 EPI slices in the anatomical space
>
> Case 2 (-2D):
> flirt -in epi_3 -ref T2flair_brain -out epi_3_in_T2flair -2D
> -schedule /usr/local/fsl/etc/flirtsch/ztransonly.sch
> Result: Now there are 4 EPI slices.
>
> What is going on here?
>
>
> Cheers,
>
> Teemu Rinne
> Dept Psychology
> Univ Helsinki, Finland
>
>
> Flirt versio is 5.4.2 (mac g5 & intel mac pro).
>
> avwinfo T2flair_brain:
> dim1 512
> dim2 512
> dim3 28
> dim4 1
> datatype 4
> pixdim1 0.4296880066
> pixdim2 0.4296819866
> pixdim3 6.0000000000
> pixdim4 1.0000000000
> cal_max 302.0000
> cal_min 0.0000
> glmax 0
> glmin 0
> origin1 257
> origin2 1
> origin3 256
> file_type ANALYZE-7.5
>
> avwinfo epi_3:
> data_type
> dim1 128
> dim2 128
> dim3 3
> dim4 1
> datatype 4
> pixdim1 -1.7187500000
> pixdim2 1.7187299728
> pixdim3 6.0000000000
> pixdim4 1.0000000000
> cal_max 3034.0000
> cal_min 0.0000
> glmax 0
> glmin 0
> origin1 16640
> origin2 16384
> origin3 256
> file_type ANALYZE-7.5
|