[ITK-users] Failed to allocate memory for image

Jim Miller millerjv at gmail.com
Sat Feb 6 09:27:52 EST 2016


Each of Abdelkhalek's volumes are 180 MB if kept as shorts.  How much memory is needed depends on the types and sequences of filters.  If a filter switches to processing floats (diffusion) or vectors (gradients), then the memory will needs escalate. Most filters needs two buffers - an input and output. Some need intermediate and temporary buffers. Filters like Watershed can need a lot of internal storage. 

If you have a long pipeline of filters, you should investigate the methods to release memory after a filter executes, such as ReleaseDataFlagOn().  You can also use scoping and DIsconnectPipeline() to force individual filters to release resources. 

Jim

> On Feb 6, 2016, at 9:03 AM, JE via Insight-users <insight-users at itk.org> wrote:
> 
> How large is one CT image (file size on disk)?
> 
>> On 06.02.16, 12:31, Abdelkhalek Bakkari wrote:
>> Hi,
>> I am using ITK for loading 361 CT images. But, When I tried to process it, an error appears :
>> 
>> Exception caught !
>> itk::MemoryAllocationError (01CDCE98)Location: "unknown"File: c:\itk 4.8.1\source\modules\core\common\include\itkImportImageContainer.hxxLine: 199Description: Failed to allocate memory for image.
>> 
>> Exception caught !
>> itk::MemoryAllocationError (01CDCE5C)Location: "unknown"File: c:\itk 4.8.1\source\modules\core\common\include\itkImportImageContainer.hxxLine: 199Description: Failed to allocate memory for image.
>> 
>> Exception thrown while writing the series
>> itk::MemoryAllocationError (01CDCD90)Location: "unknown"File: c:\itk 4.8.1\source\modules\core\common\include\itkImportImageContainer.hxxLine: 199Description: Failed to allocate memory for image.
>> 
>> Best regards, 
>> 
>> Abdelkhalek BakkariPh.D candidate in Computer ScienceInstitute of Applied Computer ScienceLodz University of Technology, Poland
>>                         
> 
>> _____________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> 
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>> 
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/insight-users
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users


More information about the Insight-users mailing list