<br>Hi Markus,<br><br>ITK assumes that images to be Added must have the same dimensions<br>and number of pixels along every dimension.<br><br>You should crop the larger image to the size of the smaller image,<br>using the RegionOfInterestImageFilter.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OR<br><br>You could extend the smaller image to the size of the larger image<br>by using the PasteImageFilter, or by using a ResampleImageFilter<br>with an IdentiyTransform.<br><br><br>&nbsp; Regards,<br><br><br>
&nbsp;&nbsp;&nbsp;&nbsp; Luis<br><br><br><br>----------------------------------------------------<br><div><span class="gmail_quote">On 3/27/07, <b class="gmail_sendername">Markus Mehrwald</b> &lt;<a href="mailto:mehrwald@ira.uka.de">mehrwald@ira.uka.de
</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br><br>I have a problem with the regions of an image or maybe the
<br>WeightedAddImageFilter is the Problem.<br>I have two images. One with a dimension of 640x512 and the other one is<br>arbitrary but let it be 280x252 and starts relative to the bigger one at<br>180x140. Now I want to add the smaller one to the bigger one starting at
<br>the position of which the smaller one is translated.<br>I tried nerly everything to do that but I allways got an invalid pointer<br>from the pixelaccessor. Input 1 is the bigger image and Input 2 the<br>smaller one. I set the requested region of the bigger one to the
<br>coordinates of the smaller one but it does not work. Setting no<br>requested region also. I turned on and off SetInplace but still the same<br>problem. Is it possible to add a smaller image to a bigger one?<br><br>Thank you for your help.
<br><br>Regards,<br>Markus<br><br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">
http://www.itk.org/mailman/listinfo/insight-users</a><br></blockquote></div><br>