[Insight-users] Still struggling with extracting information about objects resulting from a segmentation

Neal R. Harvey harve at lanl.gov
Thu Mar 11 16:10:37 EST 2010


Gaëtan Lehmann wrote:
>
> Le 11 mars 10 à 17:54, Neal R. Harvey a écrit :
>
>> I would hope that the value returned from 
>> labelMap->GetNumberOfLabelObjects() would
>> be the same as the maximum value of the watershed segmented image.
>
>
> The watershed doesn't produce consecutive labels, so this won't be true.
> The greatest label in the watershed output is likely to be a lot 
> greater than the actual number of objects.
    Yep, I had just remembered that. Doh! I am assuming that I can use 
the RelabelComponentImageFilter to
    make the labels consecutive, as this would make things a lot easier.

    Thanks a lot for the advice. I will try your other suggestion and 
see if I can get that working.

    Cheers

    Harve


More information about the Insight-users mailing list