Hi all,<br><br>I am trying to use  itk::ConnectedComponentImageFilter in the following code.. <br>.....<br>.....<br>  itk::ConnectedComponentImageFilter&lt;ImageType, ImageType&gt;::Pointer ccFilter = itk::ConnectedComponentImageFilter&lt;ImageType, ImageType&gt;::New();<br>
<br>        /* Iterate through this code */ /* When to stop? When the two seed points pixels differ */<br>        while(1)<br>        {   <br>     <br>                ImageType::Pointer e = BinaryErodeFilter3D( img, 1 );     <br>
                ccFilter-&gt;SetInput( e );     <br>                ccFilter-&gt;Update();     <br>                if ( ccFilter-&gt;GetOutput()-&gt;GetPixel( pixelIndex1 ) == ccFilter-&gt;GetOutput()-&gt;GetPixel( pixelIndex2 ) ) // Same cluster<br>
                {   <br>                        img = e;<br>                        ++noOfIterations;<br>                        std::cout &lt;&lt; &quot;Iteration no = &quot;&lt;&lt;noOfIterations &lt;&lt; std::endl;<br>
                        continue;<br>                }   <br>                else // Different Cluster<br>                {   <br>                        break;<br>                }   <br>        }   <br><br>When I try to run this code, I get an exception like this after executing the line &quot;ccFilter-&gt;Update();&quot;<br>
<br>terminate called after throwing an instance of &#39;itk::ExceptionObject&#39;<br>  what():  /home/harishd/ITK/InsightToolkit-3.16.0/Code/Common/itkMultiThreader.cxx:475:<br>itk::ERROR: MultiThreader(0x86c0598): Exception occurred during SingleMethodExecute<br>
/home/harishd/ITK/InsightToolkit-3.16.0/Code/BasicFilters/itkConnectedComponentImageFilter.txx:352:<br>itk::ERROR: ConnectedComponentImageFilter(0x86af268): Number of objects greater than maximum of output pixel type <br>
-- Process completed<br><br>*** Exception executing: Child aborted<br>***Exception: Other<br><br>Any ideas on this error?<br><br><br>Thanks,<br>Harish<br>