[Insight-users] How to trace the points along the curve?

Dan Mueller dan.muel at gmail.com
Tue Apr 9 02:30:04 EDT 2013


Hi,

> Dan, I am looking for ordered path, I noticed FastMarchingImageFilter takes Levelset and TSpeed as parameters , any idea how do I implement it?

The example source code provided with the paper demonstrates how to
use the approach (see Source/examples.cxx). You should use
SpeedFunctionToPathFilter. This filter accepts a floating point speed
image (1.0 near the curve you want to extract, 0.0 elsewhere). You
also need to provide PathInfo using AddPathInfo().

For example (the below is example pseudo-code only, it has not been compiled):

// Typedefs
const unsigned int Dimension = 2;
typedef float PixelType;
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::PolyLineParametricPath< Dimension > PathType;
typedef itk::SpeedFunctionToPathFilter< ImageType, PathType > PathFilterType;

// Create path filter
typename PathFilterType::Pointer pathFilter = PathFilterType::New();
pathFilter->SetInput( speed ); // Floating point image, 1.0 near
curve, 0.0 elsewhere

// Setup path points
typename PathFilterType::PointType start, end;
start[0] = 10; start[1] = 100;
end[0] = 100; end[1] = 10;

// Add path information
typename PathFilterType::PathInfo info;
info.SetStartPoint( start );
info.SetEndPoint( end );
pathFilter->AddPathInfo( info );

// Compute the path
pathFilter->Update( );

// Get the path
// NOTE: May be > 1 output path, depending on incoming path info
PathType::Pointer path = pathFilter->GetOutput( 0 );

Hope this helps.

Cheers, Dan

On 5 April 2013 21:05, mini d <mi20ni13 at gmail.com> wrote:
> Hi,
> Thank you for the replies.
>
> Navneeth, I did try Path, polylinepath filters I didn't understand how
> to use them.
> can you please give me a little info here ?
>
> Dan, I am looking for ordered path, I noticed FastMarchingImageFilter
> takes Levelset and TSpeed as parameters , any idea how do I implement
> it?
>
> Thanks in advance
>
> On 4/5/13, Dan Mueller <dan.muel at gmail.com> wrote:
>> Hi,
>>
>> For an ordered path, you may consider using the "Fast Marching Minimal
>> Path" method:
>>     http://www.insight-journal.org/browse/publication/213
>>
>> For unordered paths, you may consider binary thinning:
>>
>> http://www.itk.org/Doxygen/html/classitk_1_1BinaryThinningImageFilter.html
>>
>> or the "Flux Driven Medial Curve" method:
>>     http://www.insight-journal.org/browse/publication/165
>>
>> Hope this helps.
>>
>> Cheers, Dan
>>
>> On 5 April 2013 14:43, mini d <mi20ni13 at gmail.com> wrote:
>>> Hi all,
>>>
>>> I have a curve, I want to trace the points along the curve in an
>>> order/ path that is along the curve and not randomly. Do we have any
>>> way of doing this with ITK? if so please suggest me the filter/method.
>>> Assume just a normal 'S' shaped curve (white) on a black background.
>>>
>>> Thanks
>>> _____________________________________
>>> 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.php
>>>
>>> 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