[Insight-users] Speed of Fastmarching
Arnaud Gelas
arnaudgelas at gmail.com
Fri Feb 24 04:42:54 EST 2012
Hi Hui,
I am curious, how large is your input image?
What's the ratio: radius / max( spacing[i] ) ?
Anyway, to generate a signed distance image, there are other files more
efficient than the fast marching (as Steven suggested).
Thanks for your reply,
Arnaud
On Fri, Feb 24, 2012 at 10:37 AM, Hui Tang <tanghui.seu at gmail.com> wrote:
> Hi Dan,
>
> Thanks for reply! It is in release mode, but I need to wait for 4-5 mins
> to generate s distance map from one point, if I increase number of points
> to 50, I need 3 hours or so, so I guess it is not because of debug/release
> version .......................
> But I will try Steven's suggestion!
>
> Thanks you all again!
>
> Best,
>
> Hui
>
> On Thu, Feb 23, 2012 at 10:38 PM, Dan Mueller <dan.muel at gmail.com> wrote:
>
>> 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
>> >
>>
>
>
> _____________________________________
> 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
>
>
--
Arnaud Gelas, Ph. D.
Avenue Beauregard 30
CH-1700 Fribourg
Switzerland
cellphone: (+41) 76-635-08-66
phone: (+41) 26-535-44-36
arnaudgelas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120224/f80e42ec/attachment.htm>
More information about the Insight-users
mailing list