<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Alexander,<div><br></div><div>In addition to what Robert said, take a look at this submission to the Insight Journal by</div><div><br></div><div>David Doria (Criminisi Inpainting), see if it's what you are looking for,</div><div><br></div><div><a href="http://www.insight-journal.org/browse/publication/787">http://hdl.handle.net/10380/3250</a></div><div><br></div><div>Good
luck,</div><div><br></div><div>Dawood</div><div><br></div><div><br></div><div>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</div><div><br></div><div>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</div><div><br></div><div><br></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><pre>There may be a more elegant way, but I would do the following:
- Create a copy of the input image with ImageDuplicator. Fill the duplicated
image with zeroes.
- Use RegionOfInterestImageFilter to extract the computed region from the
input image.
- Perform filtering on the output of the ROI filter.
- Use PasteImageFilter to copy the filter result into the zero-filled image.
See <a href="http://www.itk.org/Wiki/ITK/Examples">http://www.itk.org/Wiki/ITK/Examples</a> for example usage of the
aforementioned filters.
On Thu, Mar 17, 2011 at 10:51 AM, Alexander Taghva <<a href="http://www.itk.org/mailman/listinfo/insight-users">alextaghva at gmail.com</a>>wrote:
><i> Hello,
</i>><i>
</i>><i> I would like to take an image, crop it to its nonzero content, perform some
</i>><i> filtering, then zero pad the image back to its original dimensions. So far,
</i>><i> I am able to compute the bounding box with a mask spatial object doing
</i>><i> something like this:
</i>><i>
</i>><i> RegionType boundingBoxRegion = m_MaskSO->GetAxisAlignedBoundingBoxRegion();
</i>><i>
</i>><i> but I don't know where to go from here. I'm relatively new to ITK.
</i>><i> Thanks for your help.
</i>><i>
</i>><i> Alex</i></pre></span></div></td></tr></table><br>