<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Same problem with SignedMaurerDistanceMapImageFilter.<br><br>Thank you anyway for the idea.<br><br>--- En date de&nbsp;: <b>Mar 23.2.10, Nick Tustison <i>&lt;ntustison@wustl.edu&gt;</i></b> a écrit&nbsp;:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>De: Nick Tustison &lt;ntustison@wustl.edu&gt;<br>Objet: Re: [Insight-users] Danielsson DistanceMap - Unable to allocate  memory for image<br>À: "Malsoaz James" &lt;jmalsoaz@yahoo.fr&gt;<br>Cc: insight-users@itk.org<br>Date: Mardi 23 février 2010, 13h37<br><br><div id="yiv201527332">Hi James<div><br></div><div>Have you tried Maurer's distance transform?</div><div><br></div><div><a rel="nofollow" target="_blank"
 href="http://www.itk.org/Doxygen/html/classitk_1_1SignedMaurerDistanceMapImageFilter.html">http://www.itk.org/Doxygen/html/classitk_1_1SignedMaurerDistanceMapImageFilter.html</a></div>

<div><br></div><div>Nick<br><br><div class="gmail_quote">On Tue, Feb 23, 2010 at 7:44 AM, Malsoaz James <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:jmalsoaz@yahoo.fr" target="_blank" href="/mc/compose?to=jmalsoaz@yahoo.fr">jmalsoaz@yahoo.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">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></tbody></table><br>




      <br>_____________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a rel="nofollow" target="_blank" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a rel="nofollow" target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>
</div></blockquote></td></tr></table><br>