[Insight-users] Connected Component Image Filter

Luis Ibanez luis . ibanez at kitware . com
Mon, 15 Dec 2003 16:10:30 -0500


Hi Radhika,


1) The reason for not assigning consecutive labels in the
    connected components is that you not always need the
    labels to be consecutive, just need them to be unique.

    The process for labeling the regions is based on
    assigning arbitrary labels first and then start aggregating
    the regions. This process cannot ensure that the final labels
    will be consecutives.

    The relabeler image filter was introduced to facilitate the
    process of renumbering the labels. In this framework, you only
    pay for the extra computation when you actually need/want to
    have consecutive labels.


2) For this one, it seems, from your second email that you
    already found the explanation. You where using an output
    image type with a dynamic range that is too small for
    representing all your components. E.g. using unsigned char
    and trying to label more than 256 components. This results
    in a rollover of the values and the undesirable effect of
    reusing labels.  Changing the image type to a larger pixel
    type will solve the problem.




Regards,


   Luis


------------------------------
Radhika Sivaramakrishna wrote:

> 
> 
> Hi Luiz,
> Thanks for the very prompt response. Actually, I was mistaken. The 38 
> regions is the result after applying relabeling. And the warning comes
> 
> Before I applying the Relabel Filter, ie at the stage of connected 
> component filter.
> I have the following further questions:
> 
> 1) Why is it that in the connected component filter, consecutive labels 
> are not assigned?
> 
> 2) Also, the input to this filter was an image with multiple distinct 
> objects, where I can clearly see the separation by eye. However, many of
> 
> these have ended up getting the same label. How is this possible?
> 
> Thanks
> Radhika
> 
>                                                     
> ----------------------------------------------------- 
> Confidentiality Notice.
> This email message is for the sole use of the intended recipient(s) and 
> may contain confidential and privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not 
> the intended recipient, please contact the sender by reply email and 
> destroy all copies of the original message. If you are the intended 
> recipient, please be advised that the content of this message is subject 
> to access, review and disclosure by the sender's Email System Administrator.
>