[Insight-users] Rotate Image Filter?
Luis Ibanez
luis . ibanez at kitware . com
Thu, 04 Sep 2003 18:06:07 -0400
Hi Parag,
The ResampleImageFilter will do this for you.
You can select any ITK transform, and any ITK interpolator
to go with it.
Please look at the example in the SoftwareGuide
http://www . itk . org/ItkSoftwareGuide . pdf
Section 6.7.1, in particular to pdf-page 212.
The code for the example illustrated in this page
is available in
Insight/Examples/Filtering/ResampleImageFilter2.cxx
Note that you should pay attention to the image origin.
Rotations are performed around the image origin, not
the image center.
Regards,
Luis
--------------------------
Parag Chandra wrote:
> Hi all,
>
> Is there code in ITK to rotate a 2-D image using nearest-neighbor
> interpolation? Has someone out there written such a filter they might
> be willing to share? I would like to avoid writing my own, and I don't
> want to add yet another 3^rd -party library just for this one
> function. Thanks!
>
> Best regards,
>
> -Parag Chandra
>