[ITK-users] Image Rotation while preserving image

Matt McCormick matt.mccormick at kitware.com
Wed Sep 24 13:39:55 EDT 2014


Hi Emma,

The resampled image will be sampled at the locations specified for the
output image by setting the desired parameters on ResampleImageFilter.
It does not does resize based on the transformation.  To get a
different output image domain, use SetOutputOrigin() and SetSize() on
the ResampleImageFilter.

Hope this helps,
Matt

On Wed, Sep 24, 2014 at 1:06 PM, Emma Ryan <eryanvtk at yahoo.com> wrote:
> HI Matt,
>
>  Thank you for your reply. Attached is a snapshot of what is happening. The
> square needs to rotate and become a diamond. But after rotation, I get a
> chopped image. Ideally, I would just expect a larger sized matrix holding
> the larger image. So I'm not sure I understand how the 'content' could be
> missing.
>
> I couldn't experiment with SetExtrapolator as it is probably not available
> in the version of itk that I am using . Version 3.X.
>
> Are you suggesting that using Extrapolation, I would be able to address this
> specific problem ?
>
> regards,
> Emma
>
>
>
>
>
>
>
> On Wednesday, September 24, 2014 7:44 AM, Matt McCormick
> <matt.mccormick at kitware.com> wrote:
>
>
> Hi Emma,
>
> If there is no content to resample from after the transformation, then
> a default pixel value is used.  To use extrapolation instead, call
> SetExtrapolator() [1] on the ResampleImageFilter.
>
> HTH,
> Matt
>
> [1]
> http://www.itk.org/Insight/Doxygen/html/classitk_1_1ResampleImageFilter.html#a89d912b5608fbe73a9a2ca0ebcfebb69
>
> On Wed, Sep 24, 2014 at 7:27 AM, Emma Ryan via Insight-users
> <insight-users at itk.org> wrote:
>> Hi,
>>
>>  I would like to rotate an input mage by a few degrees. I was able to
>> easily do this using rigid transforms available in itk. But the output
>> image
>> is cropped. The extent of cropping is directly related to the angle of
>> rotation. How can one disallow this kind of cropping ?
>>
>> Thank you for your help.
>> regards,
>> Emma
>
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/insight-users
>
>>
>
>


More information about the Insight-users mailing list