Hi Bill,<br><br>The ImageType is <br><br>typedef itk::OrientedImage&lt; unsigned short, 3 &gt; ImageType;<br><br>Thanks,<br>Harish<br><br><br><div class="gmail_quote">On Tue, Jan 26, 2010 at 8:09 PM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What is the type of ImageType?<br>
<div><div></div><div class="h5"><br>
On Tue, Jan 26, 2010 at 8:01 PM, Harish Doddi &lt;<a href="mailto:harish.slicer@gmail.com">harish.slicer@gmail.com</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I am trying to use  itk::ConnectedComponentImageFilter in the following<br>
&gt; code..<br>
&gt; .....<br>
&gt; .....<br>
&gt;   itk::ConnectedComponentImageFilter&lt;ImageType, ImageType&gt;::Pointer ccFilter<br>
&gt; = itk::ConnectedComponentImageFilter&lt;ImageType, ImageType&gt;::New();<br>
&gt;<br>
&gt;         /* Iterate through this code */ /* When to stop? When the two seed<br>
&gt; points pixels differ */<br>
&gt;         while(1)<br>
&gt;         {<br>
&gt;<br>
&gt;                 ImageType::Pointer e = BinaryErodeFilter3D( img, 1 );<br>
&gt;                 ccFilter-&gt;SetInput( e );<br>
&gt;                 ccFilter-&gt;Update();<br>
&gt;                 if ( ccFilter-&gt;GetOutput()-&gt;GetPixel( pixelIndex1 ) ==<br>
&gt; ccFilter-&gt;GetOutput()-&gt;GetPixel( pixelIndex2 ) ) // Same cluster<br>
&gt;                 {<br>
&gt;                         img = e;<br>
&gt;                         ++noOfIterations;<br>
&gt;                         std::cout &lt;&lt; &quot;Iteration no = &quot;&lt;&lt;noOfIterations &lt;&lt;<br>
&gt; std::endl;<br>
&gt;                         continue;<br>
&gt;                 }<br>
&gt;                 else // Different Cluster<br>
&gt;                 {<br>
&gt;                         break;<br>
&gt;                 }<br>
&gt;         }<br>
&gt;<br>
&gt; When I try to run this code, I get an exception like this after executing<br>
&gt; the line &quot;ccFilter-&gt;Update();&quot;<br>
&gt;<br>
&gt; terminate called after throwing an instance of &#39;itk::ExceptionObject&#39;<br>
&gt;   what():<br>
&gt; /home/harishd/ITK/InsightToolkit-3.16.0/Code/Common/itkMultiThreader.cxx:475:<br>
&gt; itk::ERROR: MultiThreader(0x86c0598): Exception occurred during<br>
&gt; SingleMethodExecute<br>
&gt; /home/harishd/ITK/InsightToolkit-3.16.0/Code/BasicFilters/itkConnectedComponentImageFilter.txx:352:<br>
&gt; itk::ERROR: ConnectedComponentImageFilter(0x86af268): Number of objects<br>
&gt; greater than maximum of output pixel type<br>
&gt; -- Process completed<br>
&gt;<br>
&gt; *** Exception executing: Child aborted<br>
&gt; ***Exception: Other<br>
&gt;<br>
&gt; Any ideas on this error?<br>
&gt;<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Harish<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>