[Insight-users] itk::PDEDeformableRegistrationFilter
InvertOutput() switch?
Luis Ibanez
luis.ibanez at kitware.com
Tue Dec 7 19:25:38 EST 2004
Hi Charl,
The directions of deformation fields in ITK have been defined in
order to be consistent with the resampling process.
The goal is that once you finish your deformable registration,
you should be able to take the resulting deformation field and
use it for resampling the Moving image in order to map it into
the reference system of the Fixed image.
This resampling process is done with the WarpImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1WarpImageFilter.html
and by passing the Moving image as its input.
Therefore, the deformation field that you want as output is one
where you have the same number of pixels as the Fixed image, and
where the vector on each pixel is pointing from the location of
the pixel in the Fixed image to the corresponding pixel in the
Moving image.
Note that in order to "move" a moving image pixel from position P1
to a position P2, what you actually do during the resampling process
is to go from position P2 (in the fixed image) and add the vector
that lead you to position P1 (in the moving image), at that point,
you interpolate a grayvalue and put it back in the point P2.
Attempting to go in the other direction will result in a resampled
image plenty of holes and with duplicated evaluation of pixels.
Please let us know if you have further questions,
Thanks
Luis
-----------------------
Charl P. Botha wrote:
> Dear ITK-ers,
>
> As far as I can figure out, PDEDeformableRegistrationFilter
> descendants (e.g. DemonsRegistrationFilter) return deformation fields
> that are directed opposite to the optical flow from moving image to
> fixed image. In other words, the deformation field is used in the
> WarpImage class to calculate for every output position what the
> corresponding input position is. (Please correct me on this if I have
> missed something somewhere...)
>
> In some cases, one would prefer having the optical flow direction,
> when for instance using the derived deformation field to visualise
> advection. Would it be possible to have a switch to reverse the sense
> of the output deformation field to be in line with the optical flow
> expectation? (this would simply mean outputting flipped vectors)
>
> Thanks for any ideas on this,
> Charl
>
More information about the Insight-users
mailing list