<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Ok, I'll go for that !</p>
<p>Many thanks Richard, for your quick answer !</p>
<p>Yann<br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Le 16/03/2017 à 02:09, Richard Beare a
écrit :<br>
</div>
<blockquote
cite="mid:CA+V7QS_Zfw7EY6KFJXoUBvL9V_uZYJt3V8Er_zs8wCbQccBRAw@mail.gmail.com"
type="cite">
<div dir="ltr">This is often a little haphazard, but the usual
approach I use is something along these lines:
<div><br>
</div>
<div>1) Use the watershed version that marks watershed lines,
and binarize the output so that the line is 1 and everything
else is zero.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Mar 16, 2017 at 6:41 AM,
asertyuio via Insight-users <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:insight-users@itk.org"
target="_blank">insight-users@itk.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I'm calculating the watershed transform of an image based on
some<br>
markers. Now, I want to calculate the maximum value of the
image on each<br>
branch of the lines separating watershed labels.<br>
<br>
I haven't found anything in ITK to separate the different
branches.<br>
<br>
I'm thinking of a good way of implementing this. My idea
would be to use<br>
a neighborhood iterator marching on the lines to list pixels
belonging<br>
to the different branches of the watershed lines, and then
use some sort<br>
of point set to calculate the max intensity in the original
image.<br>
<br>
Do you think it is a good way to go, or is there some better
alternatives ?<br>
<br>
Many thanks,<br>
<br>
Yann<br>
<br>
______________________________<wbr>_______<br>
Powered by <a moz-do-not-send="true"
href="http://www.kitware.com" rel="noreferrer"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information
visit:<br>
<a moz-do-not-send="true"
href="http://www.kitware.com/products/protraining.php"
rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a moz-do-not-send="true"
href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer"
target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://public.kitware.com/mailman/listinfo/insight-users"
rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>