Make sure you build your application in Release mode. If you are building Debug, ITK can be 10 to 50 times slower.<br><br><div class="gmail_quote">On Fri, Oct 5, 2012 at 6:00 PM, Kannan U V <span dir="ltr"><<a href="mailto:kannanuv@cshl.edu" target="_blank">kannanuv@cshl.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was missing a update on the pasteFilter. Now that the paste image<br>
filter works. but the performance is 1:4 times worse than just copying<br>
pixels from tile to mosaic from the tiles. Is there a way I can<br>
improve this performance issue?<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Sep 20, 2012 at 6:08 PM, Kannan U V <<a href="mailto:kannanuv@cshl.edu">kannanuv@cshl.edu</a>> wrote:<br>
> Hi All,<br>
> I am trying to use PasteImageFilter on a grid of image tiles. (These<br>
> are tiles with overlap) I know the position of the tiles and I want to<br>
> paste them on to the montage. I am using pasteImage filter. When I use<br>
> the following routine and I get only the last written time in the<br>
> mosaic image and all other regions are set to zero.<br>
><br>
> Moreover if I don't do a set regions on the mosaicImage I get a write<br>
> error on image writer. I need help figuring out how it has to be run.<br>
><br>
> for (int iY = 1; iY < 2; iY++) {<br>
> for (int iX = 1; iX < 3; iX++) {<br>
> cout << "Processing tile : (" << iX << "," << iY << ")" << endl;<br>
> CreateConstantImage (tileImage, (iX + iY));<br>
> pasteFilter->SetSourceImage(tileImage);<br>
> pasteFilter->SetDestinationImage (mosaicImage);<br>
> pasteFilter->SetSourceRegion(tileImage->GetLargestPossibleRegion());<br>
><br>
> mosaicIndex1[0] = iX * 812;<br>
> mosaicIndex1[1] = iY * 812;<br>
> pasteFilter->SetDestinationIndex(mosaicIndex1);<br>
><br>
> mosaicImage = pasteFilter->GetOutput();<br>
> mosaicImage->SetRegions(region);<br>
><br>
> }<br>
><br>
><br>
><br>
> --<br>
> Thanks,<br>
> Kannan<br>
<br>
<br>
<br>
--<br>
Thanks,<br>
Kannan<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>