[Insight-users] Connected Components Example

robert tamburo robert.tamburo at gmail.com
Mon Aug 15 14:14:32 EDT 2011


Thanks for providing code and data. I get a run-time error with your code
and image. I used a try/catch block around the labelFilter update and
received the below error:

itk::ERROR: ConnectedComponentImageFilter(0x1621360): Number of objects
greater than maximum of output pixel type
ConnectedComponentImageFilter (0x1621360)

Relevant class information -   ObjectCount: 1682

There are more than 256 objects to label so it crashes. To resolve the
error, change the output image type of labelFilter to an image of unsigned
short pixels.

On Mon, Aug 15, 2011 at 11:32 AM, Ryan Smith <ryanleesmith at gmail.com> wrote:

> Hi All-
>
> Please see the attached zip containing a CMakeLists file and barebones
> example program. I have a very simple application in which I tried to use
> the ConnectedComponentImageFilter.  I want to pick out the large white blob
> in the center of the image (in.tif).  The program compiles properly, but
> hangs when I try and update the ConnectedComponentImageFilter.   I'm sure I
> am being dense here but failed to find my error.  Any thoughts? Thanks-
>
> -Ryan
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110815/60964df5/attachment.htm>


More information about the Insight-users mailing list