[Insight-users] Speed of Fastmarching
Steven Mocking
smocking at nmr.mgh.harvard.edu
Thu Feb 23 13:03:35 EST 2012
Hi,
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.
Hope that helps,
Steven
On 02/23/2012 12:14 PM, Hui Tang wrote:
> Hi All,
>
> I am using itkFastMarchingImageFilter to create a distance map to a
> set of points, this seems like a very basic usage of ITK
>
> //GetNodes
> seeds->Initialize();
> for (int i=0;i<seedPoints.size();i++)
> {
> ImageType::IndexType seedIndex;
> input->TransformPhysicalPointToIndex( seedPoints[i],seedIndex);
> NodeType node;
> const double seedValue = 0.0;
> node.SetValue( seedValue );
> node.SetIndex( seedIndex );
> seeds->InsertElement( i, node );
> }
> //execute fast marching
> FastMarchingFilterType::Pointer fastMarching =
> FastMarchingFilterType::New();
> fastMarching->SetInput( input);
> fastMarching->SetTrialPoints(seeds);
> fastMarching->SetStoppingValue(2*radius);
> fastMarching->SetSpeedConstant(1);
> fastMarching->SetNormalizationFactor(1);
> fastMarching->SetOutputSize( input->GetBufferedRegion().GetSize() );
> fastMarching->Update();
>
> This works,but it is extremely slow......I think something went wrong
> but I do not know where.
>
> May I ask did anyne of you also find out this problem?
>
> Thanks a lot!
>
> Best,
>
> Hui
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120223/dabe57b3/attachment.htm>
More information about the Insight-users
mailing list