[Insight-users] create a line in itk

Luis Ibanez luis.ibanez at kitware.com
Mon Mar 29 18:20:20 EDT 2010


Edoardo,

In addition to the classes that Dan proposed,

you could also use the itkLineIterator:

http://public.kitware.com/Insight/Doxygen/html/classitk_1_1LineIterator.html

That implements a Bresenham Line algorithm in ND.

See the usage example in
http://public.kitware.com/Insight/Doxygen/html/classitk_1_1LineIterator.html#_details


   Regards


        Luis


---------------------------------------------
On Mon, Mar 29, 2010 at 4:03 AM, Dan Mueller <dan.muel at gmail.com> wrote:
> Hi Edoardo,
>
> Please have a look at the following classes:
>    Code/Common/itkPolyLineParametricPath
>    Code/Common/itkPathIterator
>    Code/BasicFilters/itkPathToImageFilter
>
> You can find examples on how to use these classes:
>    Examples\DataRepresentation\Path\PolyLineParametricPath1.cxx
>    Testing\Code\Common\itkPathIteratorTest.cxx
>    Testing\Code\BasicFilters\itkPathToImageFilterTest.cxx
>
> Please let us know if you have further questions.
>
> Regards, Dan
>
> On 28 March 2010 18:34,  <edoardo.belletti at alice.it> wrote:
>> Hi
>> Is there someone who can explain me  how can I write a line in an image?
>> For exaple I have two pixel and I whant to link this two pixel with a white
>> line:
>> // Index of the two pixel
>> ImageType::IndexType pixelIndex1;
>> ImageType::IndexType pixelIndex2;
>>
>> Thank you very much
>> Edoardo
> _____________________________________
> 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