[Insight-users] Enlarge the image
Andreas Schuh
andreas.schuh.84 at googlemail.com
Mon Mar 9 17:39:28 EDT 2009
Hi,
my first thought was that you, David, might want to change just the
spacing of the image such that it is physically bigger than before.
Let's consider this as zooming. If this is what you want, you wouldn't
need any filter as you can just reset the spacing of the image manually.
On the other side, if you meant to keep the continuous image in physical
space constant but change the size of the grid this continuous image is
sampled on, you may have a look at the ResampleImageFilter. As the name
implies, this filter resamples an image sampled on one grid on another
one. Thus, if "I need to enlarge an image, change its size (type) to a
bigger one" meant to increase the number of pixels of the discrete
image, this may be what you're looking for.
--
regards
Andreas
kent williams schrieb:
> 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
>>
>>
>>
> _____________________________________
> 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