[ITK] [ITK-users] fastest way of calculating highest value on watershed each line branches
Richard Beare
richard.beare at gmail.com
Wed Mar 15 21:09:37 EDT 2017
This is often a little haphazard, but the usual approach I use is something
along these lines:
1) Use the watershed version that marks watershed lines, and binarize the
output so that the line is 1 and everything else is zero.
2) Filter this to produce a count of neighbours at each watershed voxel.
You could write a custom neighbourhood filter to do this, or simply use a
box mean filter, radius 1. The neighbour count is then
filtervalue*filtersize - 1. You can, of course, base the following steps on
the mean, as the transform is constant.
3) In 2D the non branch points will have 2 neighbours, branch points have
more. Thus you can select branch points, dilate them, mask them out of the
watershed line and label the result. Then you can use the label statistics
filter to compute the maximum in each segment. In 3D the watershed
boundaries are "sheets", so the neighbour count is more complex, but
analagous.
On Thu, Mar 16, 2017 at 6:41 AM, asertyuio via Insight-users <
insight-users at itk.org> wrote:
> Hi all,
>
> I'm calculating the watershed transform of an image based on some
> markers. Now, I want to calculate the maximum value of the image on each
> branch of the lines separating watershed labels.
>
> I haven't found anything in ITK to separate the different branches.
>
> I'm thinking of a good way of implementing this. My idea would be to use
> a neighborhood iterator marching on the lines to list pixels belonging
> to the different branches of the watershed lines, and then use some sort
> of point set to calculate the max intensity in the original image.
>
> Do you think it is a good way to go, or is there some better alternatives ?
>
> Many thanks,
>
> Yann
>
> _____________________________________
> 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://public.kitware.com/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170316/ceb07175/attachment.html>
-------------- next part --------------
_____________________________________
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://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list