[Insight-users] Speed of Fastmarching
Dan Mueller
dan.muel at gmail.com
Thu Feb 23 16:38:34 EST 2012
Hi Hui,
Also make sure you are compiling your program in Release mode -- this
can improve performance by one or two orders of magnitude.
Cheers, Dan
On 24 February 2012 03:44, Hui Tang <tanghui.seu at gmail.com> 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
>
More information about the Insight-users
mailing list