<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi,<br><br>I'm using the DanielssonDistanceMapImageFilter on 3D volume. Unfortunately, I'm experiencing troubles when the 3D volume is too big and I get this error: "Unable to allocate memory for image".<br><br>Here is the code that I'm using:<br><div style="margin-left: 40px;">typedef itk::Image&lt;unsigned char, 3&gt; ImageType3D<br></div><div style="margin-left: 40px;">typedef itk::DanielssonDistanceMapImageFilter&lt;ImageType3D, ImageType3D&gt; FilterType;<br>&nbsp;&nbsp;&nbsp; FilterType::Pointer filter = FilterType::New();<br><br>&nbsp;&nbsp;&nbsp; typedef itk::RescaleIntensityImageFilter&lt;ImageType3D, ImageType3D&gt; RescalerType;<br>&nbsp;&nbsp;&nbsp; RescalerType::Pointer scaler = RescalerType::New();<br>&nbsp;&nbsp;&nbsp; filter-&gt;SetInput(itkImporter-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp; scaler-&gt;SetInput( filter-&gt;GetOutput()
 );<br>&nbsp;&nbsp;&nbsp; scaler-&gt;SetOutputMaximum(255);<br>&nbsp;&nbsp;&nbsp; scaler-&gt;SetOutputMinimum(0);<br>&nbsp;&nbsp; try<br>
&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; scaler-&gt;Update();<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp; catch( itk::ExceptionObject &amp; err )<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; "ExceptionObject caught !" &lt;&lt; std::endl;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; err &lt;&lt; std::endl;<br>&nbsp;&nbsp;&nbsp; }<br></div><br><br>It works great when the dimension volume are 512*512*100. But when I have volume with big dimensions (ie 512*512*350), I get the error.<br><br>Is there a solution for this problem ? Certainly I can't compute the distance map using this filter on big volumes because of memory issues.<br><br>Can I use something else to compute the distanceMap ?<br><br>By the way, my final goal with the DistanceMap is to use it in a registration process. <br>Indeed, I have CT images and a list of points obtained by a navigation system during a surgery. I would
 like to do the registration to find the transformation between the "real" points on the patient and the surface on my volume (this volume has been compute with the CT images).<br>Certainly, ITK offers good solution for such registration needs. Have you any idea?<br><br>Thank you for you help.<br>Best<br>James<br><br></td></tr></table><br>