[ITK-users] Rotate image

elena bresciani elena.bresciani87 at gmail.com
Thu Jul 3 10:16:49 EDT 2014


Hello guys,

I need help on image rotation. I have two questions:

1 - how can I modify the code in ResampleImageFilter4.cxx to make the size
of the output image following the rotation? More specifically: if image
size is Size X >> Size Y and I want a 90° rotation the result (using the
code in the example without modifications) is cropped because the new image
has now Size Y >> Size X but in the example this is not taken into account.
I know I could use Permute Axis but I would like to write something that
works both for 90 and 180 degrees rotations.

2 - I would like to do something like in the scheme attached. Actually, as
shown I've reached my goal only partially using AutoCropLabelMapFilter.
There is a simple way of doing what I want or I have to compute the angle
of inclination of my region of interest and rotate and crop accordingly?
Images are not binary!

Thanks in advance!

Elena
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20140703/fe734b45/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Scheme.pdf
Type: application/pdf
Size: 15310 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20140703/fe734b45/attachment.pdf>


More information about the Insight-users mailing list