<!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">
<font face="Helvetica, Arial, sans-serif"><small>Hi Yannick,<br>
</small></font>
<blockquote cite="mid46ADAA6E.90502@lms.polytechnique.fr" type="cite"><font
face="Helvetica, Arial, sans-serif"><small>I haven't seen the float
InternalRealType line 71. In fact, I'm new user, and the code stills a
bit confuse for me.
</small><br>
</font></blockquote>
<font face="Helvetica, Arial, sans-serif"><small>Welcome aboard! I had
the same trouble at first: ITK implements so many different concepts
that it can be overwhelming, but in my experience it was definitely the
worth the initial effort to become familiar with the toolkit. The ITK
Software Guide is a great place to start:
<a class="moz-txt-link-freetext" href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><small></small></small><small><br>
</small></font>
<blockquote cite="mid46ADAA6E.90502@lms.polytechnique.fr" type="cite"><font
face="Helvetica, Arial, sans-serif"><small>Do you think it is possible
to switch the internal real type to a less consumming type ? <br>
</small></font></blockquote>
<font face="Helvetica, Arial, sans-serif"><small>I fairly sure the
internal type must be real to avoid loss of data when applying the
Gaussian kernel.<br>
</small></font>
<blockquote cite="mid46ADAA6E.90502@lms.polytechnique.fr" type="cite"><font
face="Helvetica, Arial, sans-serif"><small>What is the interest of the
64-bits ?
<br>
</small></font></blockquote>
<font face="Helvetica, Arial, sans-serif"><small>In simple terms, a
64-bit system has an address bus which is 64 bits wide rather
than 32 bits. This means that a process (ie. program) can reference a
larger
block of memory. On a 32-bit system the total memory a program can use
at once (without too much fiddling around) is 2^32 = 4GB (on some
systems -- Windows at least -- the operating system uses some of this,
approximately 2GB). On a 64-bit system the total memory which can be
addressed is 2^64 = BIG! <br>
<br>
Kevin wrote back to your original email suggesting the use of image
streaming as another mechanism for dealing with large images:<br>
<a class="moz-txt-link-freetext" href="http://public.kitware.com/pipermail/insight-users/2007-July/023099.html">http://public.kitware.com/pipermail/insight-users/2007-July/023099.html</a><br>
This is certainly another valid approach for your particular problem:
the GradientMagnitudeRecursiveGaussianImageFilter does not require the
whole image to perform its operation, but could be applied to smaller
sections and reassembled at the end.<br>
<br>
Anyway, hope this helps.<br>
<br>
Cheers, Dan<br>
<br>
</small></font>
<blockquote cite="mid46ADAA6E.90502@lms.polytechnique.fr" type="cite"><font
face="Helvetica, Arial, sans-serif"><small>Dan Mueller a écrit :
<br>
</small></font>
<blockquote type="cite"><font face="Helvetica, Arial, sans-serif"><small>Hi
Yannick,
<br>
<br>
Indeed, the itkGradientMagnitudeRecursiveGaussianImageFilter 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:
<br>
</small></font>
<blockquote type="cite"><font face="Helvetica, Arial, sans-serif"><small>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
</small></font></blockquote>
<font face="Helvetica, Arial, sans-serif"><small></small></font></blockquote>
<font face="Helvetica, Arial, sans-serif"><small></small></font></blockquote>
</body>
</html>