<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>
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> seeds->Initialize();</div>
<div> for (int i=0;i<seedPoints.size();i++)</div>
<div> {</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>
ImageType::IndexType seedIndex;</div>
<div> input->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->InsertElement(
i, node );</div>
<div> }</div>
</div>
<div>//execute fast marching</div>
<div>
<div> FastMarchingFilterType::Pointer fastMarching =
FastMarchingFilterType::New();</div>
<div> fastMarching->SetInput( input);</div>
<div> fastMarching->SetTrialPoints(seeds);</div>
<div> fastMarching->SetStoppingValue(2*radius);</div>
<div> fastMarching->SetSpeedConstant(1);</div>
<div> fastMarching->SetNormalizationFactor(1);</div>
<div> fastMarching->SetOutputSize(
input->GetBufferedRegion().GetSize() );</div>
<div> fastMarching->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>