[Insight-users] Doubts:LabelMap and LabelObject

Kiên Kiêu kien.kieu at jouy.inra.fr
Wed Jul 17 13:46:38 EDT 2013


Hi,

Le 17 juil. 13 à 18:55, Antonio Calabrese a écrit :

> Hi,
> I think that this question is very stupid, but i'm encountering some  
> issues
> which led me to have some doubts.
> I have understand that the LabelMap is a sort of container, where  
> are stored
> a background value (ex. 0) and a series of LabelObjects.
> So, if i use a method GetNumberOfLabelObjects(), this return me the  
> number
> of labels object in the LabelMap   without counting the background,  
> that is
> not considered an object.
This seems right.
>
> Now, after some process on this LabelMap, it has also the background  
> as an
> object.
> Is it possible that this issue is, for example,
> RelabelComponentImageFilter's fault?
Difficult to figure out. What kind of processing of the label map? By  
the way, RelabelComponentImageFilter cannot be applied to a label map,  
only to an image. So I guess you transformed your label map into an  
image, and then back again to a label map.
>
> if i create a labelMap (for ex  
> with:LabelImageToStatisticsLabelMapFilter)
> from the RelabelComponentImageFilter's output, shouldn't I fix the  
> issue?
I don't think so. Now in your label image, background pixels have a  
value greater than zero and they are supposed to be part of an object.  
However, you can get what you want using SetBackgroundValue method.

Another more direct way is to use LabelSelectionLabelMapFilter and its  
method SetLabelSet in order to define what labels should be kept.
>
> Second Question:
> If a have an object with a hole, became this hole an other  
> labelobject?
> So, if i use a method GetNumberOfLabelObjects(), this return me 2  
> (one for
> the object and one for the hole) or am i wrong?
The hole should remain a hole. Objects are only made of pixels with  
values greater than zero.
>
>
>
> --
> View this message in context: http://itk-users.7.n7.nabble.com/Doubts-LabelMap-and-LabelObject-tp31912.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> 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.php
>
> 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

---
Kiên Kiêu                    tel  : + 33 (0)1 34 65 28 16
Unité MIA, INRA              fax  : + 33 (0)1 34 65 22 17
Domaine de Vilvert           email: Kien.Kieu at jouy.inra.fr
F-78350 Jouy-en-Josas        url  : http://www.inra.fr/miaj/




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130717/f35bc54e/attachment.htm>


More information about the Insight-users mailing list