Dear Xuan,
> I'm using FSL's FNIRT to register an Echo Planar image (EPI) of a
> rat brain to an rat EPI template (created by me). The output of
> FNIRT shows fairly good registration. However, when I use the
> coefficient file (the --cout parameter) as input for applywarp to
> warp the same EPI file, I ran into a problem of the first and last
> slice is stretched.
>
> In other words, an image FNIRT output is slightly different from the
> same image warped by the same coefficient file (generated by FNIRT
> run) to the same reference.
>
> On both image, 3 displays on the left are FNIRT output (--iout). 3
> displays on the right are the same input of the FNIRT run warped by
> applywarp by the coefficient file (--cout) generated by the same
> FNIRT run. As you can see, the first and last few slices are
> slightly stretched, the rest is the same.
>
If you look carefully you will see that the ultimate slices have not
been stretched, but rather that the resampled FOV is a little larger
for the applywarp output. The reason for this is that the --iout
output includes a mask that is used internally by fnirt to ensure that
no zeros (missing data) gets included in the calculation of the cost-
function.
This effect is normally not noticeable since it only affects the very
last voxel of the valid FOV, but in your case you only have 6 voxels
in the z-direction so discarding one voxel has a big effect.
In general the --iout result is for visual inspection and I personally
almost always use applywarp with --interp=spline for the generation of
the images I intend to use.
Jesper
|