Hi Bill,<br><br>The ImageType is <br><br>typedef itk::OrientedImage< unsigned short, 3 > 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"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></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 <<a href="mailto:harish.slicer@gmail.com">harish.slicer@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I am trying to use itk::ConnectedComponentImageFilter in the following<br>
> code..<br>
> .....<br>
> .....<br>
> itk::ConnectedComponentImageFilter<ImageType, ImageType>::Pointer ccFilter<br>
> = itk::ConnectedComponentImageFilter<ImageType, ImageType>::New();<br>
><br>
> /* Iterate through this code */ /* When to stop? When the two seed<br>
> points pixels differ */<br>
> while(1)<br>
> {<br>
><br>
> ImageType::Pointer e = BinaryErodeFilter3D( img, 1 );<br>
> ccFilter->SetInput( e );<br>
> ccFilter->Update();<br>
> if ( ccFilter->GetOutput()->GetPixel( pixelIndex1 ) ==<br>
> ccFilter->GetOutput()->GetPixel( pixelIndex2 ) ) // Same cluster<br>
> {<br>
> img = e;<br>
> ++noOfIterations;<br>
> std::cout << "Iteration no = "<<noOfIterations <<<br>
> 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<br>
> the line "ccFilter->Update();"<br>
><br>
> terminate called after throwing an instance of 'itk::ExceptionObject'<br>
> what():<br>
> /home/harishd/ITK/InsightToolkit-3.16.0/Code/Common/itkMultiThreader.cxx:475:<br>
> itk::ERROR: MultiThreader(0x86c0598): Exception occurred during<br>
> SingleMethodExecute<br>
> /home/harishd/ITK/InsightToolkit-3.16.0/Code/BasicFilters/itkConnectedComponentImageFilter.txx:352:<br>
> itk::ERROR: ConnectedComponentImageFilter(0x86af268): Number of objects<br>
> 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>
><br>
</div></div><div><div></div><div class="h5">> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</div></div></blockquote></div><br>