[Insight-users] Using ScaleTransform to stretch an image

David Doria daviddoria at gmail.com
Tue Nov 8 12:38:51 EST 2011


I am trying to use itkScaleTransform along with itkResampleImageFilter
to stretch or compress an image by a non-integer amount. E.g. make an
image 1.5x larger than it was.

Here is my attempt:
http://www.itk.org/Wiki/ITK/Examples/WishList/ImageProcessing/ScaleTransform

The example creates a 100x100 black image with a white square in the
middle. It then attempts to scale the image by 1.5x in both
dimensions.

The problem is that the size of the output image is correct (in this
case 150x150), but the square has seemed to stay at the same
coordinates, rather than staying centered in the new, larger image.

Can anyone see what I have done wrong?

Thanks,

David


More information about the Insight-users mailing list