[Insight-users] Problem with regions

Luis Ibanez luis.ibanez at kitware.com
Tue Mar 27 09:24:44 EST 2007


Hi Markus,

ITK assumes that images to be Added must have the same dimensions
and number of pixels along every dimension.

You should crop the larger image to the size of the smaller image,
using the RegionOfInterestImageFilter.

         OR

You could extend the smaller image to the size of the larger image
by using the PasteImageFilter, or by using a ResampleImageFilter
with an IdentiyTransform.


  Regards,


     Luis



----------------------------------------------------
On 3/27/07, Markus Mehrwald <mehrwald at ira.uka.de> wrote:
>
> Hi all,
>
> I have a problem with the regions of an image or maybe the
> WeightedAddImageFilter is the Problem.
> I have two images. One with a dimension of 640x512 and the other one is
> arbitrary but let it be 280x252 and starts relative to the bigger one at
> 180x140. Now I want to add the smaller one to the bigger one starting at
> the position of which the smaller one is translated.
> I tried nerly everything to do that but I allways got an invalid pointer
> from the pixelaccessor. Input 1 is the bigger image and Input 2 the
> smaller one. I set the requested region of the bigger one to the
> coordinates of the smaller one but it does not work. Setting no
> requested region also. I turned on and off SetInplace but still the same
> problem. Is it possible to add a smaller image to a bigger one?
>
> Thank you for your help.
>
> Regards,
> Markus
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070327/351d8c57/attachment.html


More information about the Insight-users mailing list