[Insight-users] Enlarge the image

kent williams nkwmailinglists at gmail.com
Mon Mar 9 15:55:07 EDT 2009


What you said, as it stands, makes no sense.  First of all, the
default behavior is to not to modify the input image at all. A new
image is generated. There are some special cases of 'in place' filters
that are supposed to change the input, because the input and output
are the same image.

Second of all, if you resize an image, you're going to be resampling.

What I think you mean is you either want to go from 2D to 3D (for
example), or embed an image unmodified inside a larger image.

In the former case, you can use itk::CastImageFilter.  In the latter
case, it's more complicated.

1. Create and Allocate the larger output image.
2. Use itk::ImageRegionIterators to copy from the original image into
the larger image at a particular offset.

If you can clarify what you're trying to do we can provide a better answer.

On Mon, Mar 9, 2009 at 1:13 PM, David Pastor <david.pastor at die.upm.es> wrote:
> Hello,
>
> I need to enlarge an image, change its size type to a bigger one without
> modifying the content of the original one, so there is no rescaling. Any
> direct filter for this?
>
> cheers
> david
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> 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://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list