I&#39;m pretty sure that itk&#39;s cc algorithms are n-d.<div><br></div><div>Also, there are other benefits to linking to ITK. It has a much broader selection of image filters and segmentation techniques.</div><div><span></span><br>
<br>On Tuesday, March 12, 2013, Richard Frank  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks David,<br>
<br>
Yes, I looked at the threshold connectivity filter and noticed the required seeds.<br>
<br>
I have some 2d connected components/union find code that I will try to reimplement  for 3d.<br>
<br>
I just wanted to see if the connectivity filter would do what I want, and it does seem to....<br>
<br>
Do you happen to know if ITK has a general cc region find in n dimensions? We may want to link our app at some point to make use of ITK ( in spite of the different image layouts).<br>
<br>
I think your class would be a good contribution VTK- it&#39;s a basic tool that seems to be missing....<br>
<br>
Thanks<br>
<br>
Rick Frank<br>
<br>
On Mar 12, 2013, at 7:57 AM, David Gobbi &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;david.gobbi@gmail.com&#39;)">david.gobbi@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi Richard,<br>
&gt;<br>
&gt; If your data is a volume, then vtkImageThresholdConnectivity might be<br>
&gt; more suitable.  It requires you to set seeds, though, and I&#39;m not sure<br>
&gt; if that&#39;s what you want.<br>
&gt;<br>
&gt; I also have a filter in my personal collection that selects image<br>
&gt; regions based on size (rather than requiring you to set seed<br>
&gt; locations) and I could potentially contribute it to VTK.  Internally<br>
&gt; it computes labels for each region, up to a max of 254, and the code<br>
&gt; could be modified so that it outputs the labels.<br>
&gt;<br>
&gt; - David<br>
&gt;<br>
&gt; On Tue, Mar 12, 2013 at 5:43 AM, Richard Frank &lt;<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;rickfrank@me.com&#39;)">rickfrank@me.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m having trouble understanding the usages of the connectivity filter.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m trying to use this filter to find and filter out regions in a volume, as one might do with bwlabeln() in matlab....<br>
&gt;&gt;<br>
&gt;&gt; What does AddRegion() do? Does that usage imply that I already know how many regions there are? Why/when would I use DeleteRegion()?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; If I ask for all regions, I get the whole volume even if I set a tight scalar threshold. If I ask for the largest region, I get what I would expect,  but that&#39;s not what I need.<br>
&gt;&gt;<br>
&gt;&gt; If I set specific regions, and add 0,1,2 and use a threshold that I know should work, I get nothing.<br>
&gt;&gt;<br>
&gt;&gt; So, I guess I don&#39;t understand the correct use.<br>
&gt;&gt;<br>
&gt;&gt; Any advice welcome.....<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Thanks<br>
&gt;&gt; Rick Frank<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>