[Insight-users] Distance to point in connected object
Dan Mueller
d.mueller at qut.edu.au
Tue Apr 24 17:27:08 EDT 2007
Hi Kevin,
Assuming your image is binary (either 'on', or 'off'), I think the
FastMarchingImageFilter will do this for you:
http://www.itk.org/Doxygen/html/classitk_1_1FastMarchingImageFilter.html
Create a speed image from your binary image (off = 0.0, on = 1.0), add a
trial point at the desired location, and run the filter. The result will
be the time-crossing map (note that all values outside of the speed
image (0.0) will receive a huge value, so you will have to do a
threshold at the end). The FastMarchingImageFilter is also in the
software guide around section 9.3.1.
HTH, Dan
Kevin H. Hobbs wrote:
> Is there any way to tell how far the pixels of an object are from a
> point within that object without the path leaving the object? I don't
> mean "as the crow flies" but following roads.
>
> I know that's a sort of a bad description maybe some ASCII art will
> help.
>
> If I have a segmented image like this.
>
> -------------------
> | |
> | 11 |
> | 1 |
> | 111 1 |
> | 11111111111 |
> | 111 |
> | |
> -------------------
>
> I pick a point in the middle of the blob in the lower left. I want the
> pixels relabeled like this.
> -------------------
> | |
> | 98 |
> | 7 |
> | 212 6 |
> | 21012345678 |
> | 212 |
> | |
> -------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
--
Dan Mueller
PhD Candidate (02562065)
School of Engineering Systems (ES)
Faculty of Built Environment and Engineering (BEE)
Queensland University of Technology (QUT)
CRICOS No: 00213J
Email: d.mueller at qut.edu.au
Phone: +617 3864 9124
Mobile: +61 0401 451 850
Room: Gardens Point S903.10
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070425/5720a991/attachment.html
More information about the Insight-users
mailing list