<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<small><font face="Helvetica, Arial, sans-serif">Hi Yannick,<br>
<br>
Indeed, the <font face="Courier New, Courier, monospace">itkGradientMagnitudeRecursiveGaussianImageFilter</font>
uses floating point intermediate images: the great thing about open
source is that you can see for yourself!<br>
<a class="moz-txt-link-freetext" href="http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkGradientMagnitudeRecursiveGaussianImageFilter.h?root=Insight&view=markup">http://www.itk.org/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkGradientMagnitudeRecursiveGaussianImageFilter.h?root=Insight&view=markup</a><br>
around line 71.<br>
<br>
I too am working with large 3D datasets and regularly received similar
memory allocation exceptions -- the solution for me was to move to a
64-bit machine. Are you on a 32-bit machine? How much physical memory
does your machine have?<br>
<br>
Cheers, Dan<br>
<br>
Yannick Pannier wrote:</font></small>
<blockquote cite="mid46A9F883.5000108@lms.polytechnique.fr" type="cite"><small><font
face="Helvetica, Arial, sans-serif">Hi everobody,
<br>
<br>
I have some difficulties to adapt
GradientMagnitudeRecursiveGaussianImageFilter to be used on
1024*1024*512 8-bits data.
<br>
I have modified the "InputPixelType" and "OutputPixelType" to be
"unsigned char", also :
<br>
"typedef itk::Image< InputPixelType, 3 > InputImageType;
<br>
typedef itk::Image< OutputPixelType, 3 > OutputImageType; "
<br>
and :
<br>
"typedef unsigned char WritePixelType;
<br>
typedef itk::Image< WritePixelType, 3 > WriteImageType;"
<br>
and when executed on 1024*1024*512 8 bits data, it returns :
<br>
"terminate called after throwing an instance of 'itk::ExceptionObject'
<br>
what(): .../src/Insight/Code/Common/itkImportImageContainer.txx:188:
<br>
Failed to allocate memory for image."
<br>
I think there stills some hidden float operations due to the gaussian
filtering because when I launch the GradientMagnitudeImageFilter (with
the same modifications in the code) with the same data, it ends with
success.
<br>
Can you tell me what I've missed ?
<br>
<br>
Thanks
<br>
<br>
Yannick<br>
</font>
</small></blockquote>
<small><font face="Helvetica, Arial, sans-serif"><br>
</font></small>
<div class="moz-signature"><small><font color="Gray"
face="Helvetica, Arial, sans-serif" size="2"><small><br>
</small></font>
</small></div>
</body>
</html>