[Insight-developers] Bad Memory Alloc issue with Large data

Martin Waitzbauer mazzok at gmx.at
Mon Mar 28 14:22:30 EDT 2011


Hello,

ive written a program that uses 4 filters
2 original itk Filters
"itkVnlFFTRealToComplexConjugateImageFilter.h"
"itkVnlFFTComplexConjugateToRealImageFilter.h"
2 self written
"GaussMaskImage.h"
"FFTShiftFilter.h"

The pipeline will be:
itkVnlFFTRealToComplexConjugateImageFilter->FFTShiftFilter1->GaussMaskImage->FFTShiftFilter2->itkVnlFFTComplexConjugateToRealImageFilter

Both gaussmaskimage + fftshiftfilter work as they should on small data, , but the above pipeline will not execute with large data, then i get a bad allocation error in the last Filters ->Update() method
however if i dont include every filter (lets say 3 out of 4, which filter doesnt matter) the pipeline works.

ive added a minimal application that creates a 512x512x125 float image, which is handed to the begin of the pipeline, 
itkVnlFFTRealToComplexConjugateImageFilter is only executed once
the remainig filters are executed moreoften
ive done some simple loops, where one can include/exclude the calculations of the other filters

ive seen that for example
1,loop of FFTShiftFilter1
2,loop of FFTShiftFilter2
3,loop of itkVnlFFTComplexConjugateToRealImageFilter 
aswell as
1,loop of GaussMask
2,loop of FFTShiftFilter2
3,loop of itkVnlFFTComplexConjugateToRealImageFilter 
aswell as
1,loop of FFTShiftFilter1
2,loop of GaussMask
3,loop of itkVnlFFTComplexConjugateToRealImageFilter 
will work but
1,loop of FFTShiftFilter1
2,loop of GaussMask
1,loop of FFTShiftFilter2
3,loop of itkVnlFFTComplexConjugateToRealImageFilter

will have the last filter return a bad allocation error
Im a little confused about this behavior and really dont know how to pass it by, id greatly appreaciate someone looking into it and having some advices for me!

Thanks Big time

Maz
-- 
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit 
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: minimal.zip
Type: application/zip
Size: 5065 bytes
Desc: not available
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110328/221b23a3/attachment.zip>


More information about the Insight-developers mailing list