<br>Hi Lynx,<br><br><br>1) Yes, you can release the memory of the distance filter once<br> the subsequent filters have been updated. You do this by calling<br><br> distanceFilter->ReleaseDataFlagOn();<br>
<br> before you call Update() in the filters downstream.<br><br><br>2) You could use the FastMarching filter for computing an approximation<br> to the distance map, if you don't mind having to provide a seed point...<br>
<br><br>3) You may want to try also the MaurerSignedDistanceMap filter.<br> We know that it run about 10 times faster than the Danielson filter....<br> I'm not sure how it will do with memory allocations...<br><br>
<br> Regards,<br><br><br> Luis<br><br><br><br>------------------------------------------------------------------------------------------------<br><div class="gmail_quote">On Wed, Aug 12, 2009 at 12:41 PM, <span dir="ltr"><<a href="mailto:lynx.abraxas@freenet.de">lynx.abraxas@freenet.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 10/08/09 17:19:02, <a href="mailto:lynx.abraxas@freenet.de">lynx.abraxas@freenet.de</a> wrote:<br>
> Anyway, with the 4.4GB dataset I get the following:<br>
><br>
> time ~/itk/watershed07/watershed07 zs_gauss-0.5-9_ru_16bit.raw zs_gauss-0.5-9_ru_ws_113101.tif 1 1 3 1 0 1 1550 1549 950<br>
> signed danielson distance map...<br>
> Morphological watershed...<br>
> Creating output...<br>
> terminate called after throwing an instance of 'itk::ExceptionObject'<br>
> what(): /home/ttd/localusr/include/InsightToolkit/Common/itkImportImageContainer.txx:188:<br>
> Failed to allocate memory for image.<br>
<br>
Since I can now use 8-bit encoding for my binarised data and cropping I'm at<br>
1.2GB of data. I noticed by inserting Update() that the creation of the<br>
distance map is consuming a lot of memory (around 50 times as much as the size<br>
of the input dataset). I assume that depends on the actual length of occuring<br>
distances in the evaluation. It seems that after a slow steady increas to 12GB<br>
RAM usage there was a sudden need of so much more RAM that my program<br>
terminated within the update period of top. (And so I never saw it use up more<br>
than 26% of RAM.)<br>
Is there any way I can reduce the needed memory further? I can't crop more nor<br>
would I like to bin the data. I know that commercial programs can create<br>
distance maps (perhaps less accurate) with much less memory consumption.<br>
Is there any way I can estimate the maximum memory needed and also the time to<br>
finish computing?<br>
<br>
Can I free the memory the distance map filter needed when it has finished so<br>
there is more RAM again for the following filters?<br>
<br>
Regards,<br>
Lynx<br>
<br>
<br>
<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>
Please keep messages on-topic and check the ITK FAQ at: <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>
</blockquote></div><br>