<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br><div><div>Le 17 juil. 13 à 18:55, Antonio Calabrese a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br>I think that this question is very stupid, but i'm encountering some issues<br>which led me to have some doubts.<br>I have understand that the LabelMap is a sort of container, where are stored<br>a background value (ex. 0) and a series of LabelObjects.<br>So, if i use a method GetNumberOfLabelObjects(), this return me the number<br>of labels object in the LabelMap without counting the background, that is<br>not considered an object.<br></div></blockquote>This seems right.<br><blockquote type="cite"><div><br>Now, after some process on this LabelMap, it has also the background as an<br>object.<br>Is it possible that this issue is, for example,<br>RelabelComponentImageFilter's fault?<br></div></blockquote>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.<br><blockquote type="cite"><div><br>if i create a labelMap (for ex with:LabelImageToStatisticsLabelMapFilter)<br>from the RelabelComponentImageFilter's output, shouldn't I fix the issue?<br></div></blockquote>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.</div><div><br></div><div>Another more direct way is to use LabelSelectionLabelMapFilter and its method SetLabelSet in order to define what labels should be kept.<br><blockquote type="cite"><div><br>Second Question:<br>If a have an object with a hole, became this hole an other labelobject?<br>So, if i use a method GetNumberOfLabelObjects(), this return me 2 (one for<br>the object and one for the hole) or am i wrong?<br></div></blockquote>The hole should remain a hole. Objects are only made of pixels with values greater than zero.<br><blockquote type="cite"><div><br><br><br>--<br>View this message in context: <a href="http://itk-users.7.n7.nabble.com/Doubts-LabelMap-and-LabelObject-tp31912.html">http://itk-users.7.n7.nabble.com/Doubts-LabelMap-and-LabelObject-tp31912.html</a><br>Sent from the ITK - Users mailing list archive at Nabble.com.<br>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></div></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Courier; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Courier; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Courier; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>---</div><div>Kiên Kiêu tel : + 33 (0)1 34 65 28 16</div><div>Unité MIA, INRA fax : + 33 (0)1 34 65 22 17<br>Domaine de Vilvert email: <a href="mailto:Kien.Kieu@jouy.inra.fr">Kien.Kieu@jouy.inra.fr</a><br>F-78350 Jouy-en-Josas url : <a href="http://www.inra.fr/miaj/">http://www.inra.fr/miaj/</a></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>