<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div id="yiv2109069471"><table cellspacing="0" cellpadding="0" border="0" id="yiv2109069471bodyDrftID" class="yiv2109069471"><tbody><tr><td id="yiv2109069471drftMsgContent" style="font:inherit;font-family:arial;font-size:10pt;"><span class="yiv2109069471Apple-style-span" style="font-family:arial, helvetica, clean, sans-serif;line-height:15px;"><table cellspacing="0" cellpadding="0" border="0" style="border-collapse:collapse;font-size:inherit;line-height:1.2em;outline-style:none;outline-color:initial;display:table;"><tbody style="line-height:1.2em;outline-style:none;outline-color:initial;"><tr style="line-height:1.2em;outline-style:none;outline-color:initial;display:table-row;vertical-align:inherit;"><td valign="top" style="line-height:1.2em;outline-style:none;outline-color:initial;display:table-cell;font:inherit;"><span
 class="yiv2109069471yiv511988312Apple-style-span" style="line-height:1.2em;outline-style:none;outline-color:initial;font-family:'Times New Roman';font-size:medium;"><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">Hi Igor,</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre
 style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">The level of details in watershed segmentation is controlled by a</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="
line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">pre-smoothing step. It is most likely that the parameter setting</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre
 style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">for the pre-smoothing step in your application is causing an under-smoothing</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal
 monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">effect. Usually for pre-smoothing prior to the watershed segmentation an&nbsp;</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">anisotropic&nbsp;diffusion filter is used. The level of smoothing in anisotropic&nbsp;</pre><pre
 style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">diffusion filter is controlled by three parameters, number of iterations,&nbsp;</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal
 monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">time step and conductivity. Decreasing the number of iterations and the&nbsp;</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br></pre><pre
 style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">conductivity factor can smooth more edges as well as increasing the time step.</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal
 monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">However, depending on your images better results might be achievable&nbsp;</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">using a different pre-smoothing method.</pre><pre
 style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">As for the connectivity, you can use the neighborhood iterators.</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal
 monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">HTH,</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;
white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">Dawood</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal
 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal
 monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;
line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><span class="yiv2109069471yiv511988312Apple-style-span" style="line-height:1.2em;outline-style:none;outline-color:initial;font-family:'Times New Roman';white-space:normal;"><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:19px;white-space:pre;">&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;</pre></span></pre><pre
 style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;"><br style="line-height:1.2em;outline-style:none;outline-color:initial;"></pre><pre style="margin-top:1em;
margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font:normal normal normal 115%/normal monospace;line-height:1.2em;outline-style:none;outline-color:initial;display:block;font-size:16px;white-space:pre;">Hi,

i'm using WatershedImageFilter, but oversegmentation occurs.

I want to join segments that are very small to their bigger neighbors (if
they have more then x touching pixels).

So i basically want to:
 - join two given labels in a LabelImage
 - measure how much two labels in a LabelImage touch each other

Is there a way to do this nice and easy in itk?

Or, if you have another approach to handle oversegmentation, please also
tell me.

Cheers
Igor</pre></span></td></tr></tbody></table></span></td></tr></tbody></table></div></td></tr></table><br>