[Insight-users] How to reduce the needed RAM for distance map creation?
lynx.abraxas at freenet.de
lynx.abraxas at freenet.de
Wed Aug 12 12:41:19 EDT 2009
On 10/08/09 17:19:02, lynx.abraxas at freenet.de wrote:
> Anyway, with the 4.4GB dataset I get the following:
>
> 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
> signed danielson distance map...
> Morphological watershed...
> Creating output...
> terminate called after throwing an instance of 'itk::ExceptionObject'
> what(): /home/ttd/localusr/include/InsightToolkit/Common/itkImportImageContainer.txx:188:
> Failed to allocate memory for image.
Since I can now use 8-bit encoding for my binarised data and cropping I'm at
1.2GB of data. I noticed by inserting Update() that the creation of the
distance map is consuming a lot of memory (around 50 times as much as the size
of the input dataset). I assume that depends on the actual length of occuring
distances in the evaluation. It seems that after a slow steady increas to 12GB
RAM usage there was a sudden need of so much more RAM that my program
terminated within the update period of top. (And so I never saw it use up more
than 26% of RAM.)
Is there any way I can reduce the needed memory further? I can't crop more nor
would I like to bin the data. I know that commercial programs can create
distance maps (perhaps less accurate) with much less memory consumption.
Is there any way I can estimate the maximum memory needed and also the time to
finish computing?
Can I free the memory the distance map filter needed when it has finished so
there is more RAM again for the following filters?
Regards,
Lynx
More information about the Insight-users
mailing list