<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi, <br>
    <br>
    You should check out the SignedMaurerDistanceMapImageFilter. It is
    orders of magnitude faster than a marching filter. You can just
    threshold the output if you want to limit it to a certain radius.<br>
    <br>
    Hope that helps,<br>
    &nbsp; Steven<br>
    <br>
    On 02/23/2012 12:14 PM, Hui Tang wrote:
    <blockquote
cite="mid:CAEz0C-4DZ9SgqyW_xpVULsJi2c9eipg5tfd698jrHch5cw1qxA@mail.gmail.com"
      type="cite">Hi All,
      <div><br>
      </div>
      <div>I am using itkFastMarchingImageFilter to create a distance
        map to a set of points, this seems like a very basic usage of
        ITK</div>
      <div><br>
      </div>
      <div>//GetNodes</div>
      <div>
        <div>&nbsp; seeds-&gt;Initialize();</div>
        <div>&nbsp; for (int i=0;i&lt;seedPoints.size();i++)</div>
        <div>&nbsp; {</div>
        <div><span class="Apple-tab-span" style="white-space:pre"> </span>
          &nbsp; &nbsp;ImageType::IndexType seedIndex;</div>
        <div>&nbsp; &nbsp; &nbsp; &nbsp; input-&gt;TransformPhysicalPointToIndex(
          seedPoints[i],seedIndex);</div>
        <div><span class="Apple-tab-span" style="white-space:pre"> </span>NodeType
          node;</div>
        <div><span class="Apple-tab-span" style="white-space:pre"> </span>const
          double seedValue = 0.0;</div>
        <div><span class="Apple-tab-span" style="white-space:pre"> </span>node.SetValue(
          seedValue );</div>
        <div><span class="Apple-tab-span" style="white-space:pre"> </span>node.SetIndex(
          seedIndex );</div>
        <div><span class="Apple-tab-span" style="white-space:pre"> </span>seeds-&gt;InsertElement(
          i, node );</div>
        <div>&nbsp; }</div>
      </div>
      <div>//execute fast marching</div>
      <div>
        <div>&nbsp; FastMarchingFilterType::Pointer fastMarching =
          FastMarchingFilterType::New();</div>
        <div>&nbsp; fastMarching-&gt;SetInput( input);</div>
        <div>&nbsp; fastMarching-&gt;SetTrialPoints(seeds);</div>
        <div>&nbsp; fastMarching-&gt;SetStoppingValue(2*radius);</div>
        <div>&nbsp; fastMarching-&gt;SetSpeedConstant(1);</div>
        <div>&nbsp; fastMarching-&gt;SetNormalizationFactor(1);</div>
        <div>&nbsp; fastMarching-&gt;SetOutputSize(
          input-&gt;GetBufferedRegion().GetSize() );</div>
        <div>&nbsp; fastMarching-&gt;Update();</div>
      </div>
      <div><br>
      </div>
      <div>This works,but it is extremely slow......I think something
        went wrong but I do not know where.</div>
      <div><br>
      </div>
      <div>May I ask did anyne of you also find out this problem?</div>
      <div><br>
      </div>
      <div>Thanks a lot!</div>
      <div><br>
      </div>
      <div>Best,</div>
      <div><br>
      </div>
      <div>Hui</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_____________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Kitware offers ITK Training Courses, for more information visit:
<a class="moz-txt-link-freetext" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a>

Please keep messages on-topic and check the ITK FAQ at:
<a class="moz-txt-link-freetext" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
</pre>
    </blockquote>
    <br>
  <font face="monospace"><br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
http://www.partners.org/complianceline . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.</font></body>
</html>