<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Yes. Note that BinaryImageToShapeLabelMapFilter is convenient in the case all regions are given the same label. In case separate regions have different labels, use LabelImageToShapeLabelMapFilter.</div><br><div><div>Le 15 juin 12 à 12:21, Miriam Pini a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><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: -webkit-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 class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr">Hi Kien,<br><br>thank you for your help! I'm trying to use tha class you suggested: am I correct saying that the foreground value is the the colour that can be chosen for the lable objects??<br><br>Thank you very much,<br><br>Miriam<span class="Apple-converted-space">&nbsp;</span><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From:<span class="Apple-converted-space">&nbsp;</span><a href="mailto:kien.kieu@jouy.inra.fr">kien.kieu@jouy.inra.fr</a><br>To:<span class="Apple-converted-space">&nbsp;</span><a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>Date: Fri, 15 Jun 2012 09:16:14 +0200<br>Subject: Re: [Insight-users] ConnectedComponentImageFilter<br><br><div>Hi,</div><div><br></div><div>you may use BinaryImageToShapeLabelMapFilter. Eventually you will have to adjust the ForegroundValue attribute. Then use either the methods GetNumberOfPixels or GetPhysicalSize of ShapeLabelObject to get the size you wish for each object (connected component).</div><br><div><div>Le 14 juin 12 à 19:57, Miriam Pini a écrit :</div><br class="ecxApple-interchange-newline"><blockquote><span class="ecxApple-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: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div class="ecxhmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr">Hi guys,<br><br>I have an image with separated regions of the same colour and I'd like to get the dimension of each of them. Is the ConnectedComponentImageFilter the best class to do that?<span class="ecxApple-converted-space">&nbsp;</span><br><br>Any suggestion is greatly appreciated,<br><br>thank you all,<br><br>Miriam<br></div>_____________________________________<br>Powered by<span class="ecxApple-converted-space">&nbsp;</span><a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br></div></span></blockquote></div><br><div><span class="ecxApple-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-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><div style="word-wrap: break-word; "><span class="ecxApple-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; "><div style="word-wrap: break-word; "><span class="ecxApple-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; "><div style="word-wrap: break-word; "><div>---</div><div>Kiên Kiêu &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tel &nbsp;: + 33 (0)1 34 65 28 16</div><div>Unité MIA, INRA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fax &nbsp;: + 33 (0)1 34 65 22 17<br>Domaine de Vilvert &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email:&nbsp;<a href="mailto:Kien.Kieu@jouy.inra.fr">Kien.Kieu@jouy.inra.fr</a><br>F-78350 Jouy-en-Josas &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url &nbsp;:&nbsp;<a href="http://www.inra.fr/miaj/" target="_blank">http://www.inra.fr/miaj/</a></div></div></span><br class="ecxApple-interchange-newline"></div></span><br class="ecxApple-interchange-newline"></div></span><br class="ecxApple-interchange-newline"></div><br><br>_____________________________________ Powered by<span class="Apple-converted-space">&nbsp;</span><a href="http://www.kitware.com">www.kitware.com</a><span class="Apple-converted-space">&nbsp;</span>Visit other Kitware open-source projects at<span class="Apple-converted-space">&nbsp;</span><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>Kitware offers ITK Training Courses, for more information visit:<span class="Apple-converted-space">&nbsp;</span><a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><span class="Apple-converted-space">&nbsp;</span>Please keep messages on-topic and check the ITK FAQ at:<a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><span class="Apple-converted-space">&nbsp;</span>Follow this link to subscribe/unsubscribe:<span class="Apple-converted-space">&nbsp;</span><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a></div></div></div></span></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 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tel &nbsp;: + 33 (0)1 34 65 28 16</div><div>Unité MIA, INRA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fax &nbsp;: + 33 (0)1 34 65 22 17<br>Domaine de Vilvert &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;email:&nbsp;<a href="mailto:Kien.Kieu@jouy.inra.fr">Kien.Kieu@jouy.inra.fr</a><br>F-78350 Jouy-en-Josas &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url &nbsp;:&nbsp;<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></body></html>