<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">What do you mean by “add the label on the 3D image”? Do you have an example? Are you talking about composing the label image (binary image) with the grayscale image?</div>
<div class=""><br class="">
</div>
<div class="">Brad</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Aug 10, 2016, at 9:19 AM, Matthias B <<a href="mailto:matthias.b@hotmail.com" class="">matthias.b@hotmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
I understand, but how do I add the label on the 3D image programmatically?
<div class="">preferable in C#, but C++ is also ok.</div>
<div class=""><br class="">
</div>
<div class="">Thank you for your help<br class="">
<div class="">
<hr id="stopSpelling" class="">
From: <a href="mailto:dzenanz@gmail.com" class="">dzenanz@gmail.com</a><br class="">
Date: Wed, 10 Aug 2016 09:14:35 -0400<br class="">
Subject: Re: [ITK] Determine surface area of certain region in image<br class="">
To: <a href="mailto:matthias.b@hotmail.com" class="">matthias.b@hotmail.com</a><br class="">
CC: <a href="mailto:blowekamp@mail.nih.gov" class="">blowekamp@mail.nih.gov</a>; <a href="mailto:dan.muel@gmail.com" class="">
dan.muel@gmail.com</a>; <a href="mailto:community@itk.org" class="">community@itk.org</a><br class="">
<br class="">
<div dir="ltr" class="">
<div class="ecxgmail_default" style="font-family: verdana, sans-serif; font-size: small;">
The 3D image where the label will be applied is need for statistics such as mean, min and max values. If you don't care about those, you can supply the same image as both label and original (intensity) image. Or you can supply an empty (all black) image there.</div>
<div class="ecxgmail_default" style="font-family: verdana, sans-serif; font-size: small;">
<br class="">
</div>
<div class="ecxgmail_default" style="font-family: verdana, sans-serif; font-size: small;">
HTH,</div>
<div class="ecxgmail_default" style="font-family: verdana, sans-serif; font-size: small;">
Dženan</div>
</div>
<div class="ecxgmail_extra"><br class="">
<div class="ecxgmail_quote">On Wed, Aug 10, 2016 at 8:47 AM, Matthias B<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:matthias.b@hotmail.com" target="_blank" class="">matthias.b@hotmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class="">
<blockquote class="ecxgmail_quote" style="border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">
<div class="">
<div dir="ltr" class="">Thank you for answering <span style="font-family: verdana, sans-serif; font-size: 10pt;" class="">Dženan</span>,
<div class=""><br class="">
</div>
<div class="">ok<span style="font-size: 12pt;" class="">, the perimeter attribute is what I need.</span></div>
<div class=""><span style="font-size: 12pt;" class=""><br class="">
</span></div>
<div class="">Problem is that I don't see a way where I can</div>
<div class="">1. Choose a label image to define the region</div>
<div class="">2. Choose the 3D Image where the label will be aplied</div>
<div class=""><br class="">
</div>
<div class="">At this moment it looks for me that the label image already contains the 3D data, which confuses me.<br class="">
<div class=""><br class="">
<div class="">
<hr class="">
From:<span class="Apple-converted-space"> </span><a href="mailto:dzenanz@gmail.com" target="_blank" class="">dzenanz@gmail.com</a><br class="">
Date: Wed, 10 Aug 2016 08:32:53 -0400<span class=""><br class="">
Subject: Re: [ITK] Determine surface area of certain region in image<br class="">
</span>To:<span class="Apple-converted-space"> </span><a href="mailto:matthias.b@hotmail.com" target="_blank" class="">matthias.b@hotmail.com</a><br class="">
CC:<span class="Apple-converted-space"> </span><a href="mailto:blowekamp@mail.nih.gov" target="_blank" class="">blowekamp@mail.nih.gov</a>;<span class="Apple-converted-space"> </span><a href="mailto:community@itk.org" target="_blank" class="">community@itk.org</a>
<div class="">
<div class="h5"><br class="">
<br class="">
<div dir="ltr" class="">
<div style="font-family: verdana, sans-serif; font-size: small;" class="">Hi Matthias,</div>
<div style="font-family: verdana, sans-serif; font-size: small;" class=""><br class="">
</div>
<div style="font-family: verdana, sans-serif; font-size: small;" class="">perimeter should be surface area in 3D (which you can divide by 2 to eliminate back side if you have a very flat object). In 2D image, it is the circumference. In 2D image, you can get
object's surface area by counting how many pixels it has and then multiplying that by the size of each pixel (spacing[0]*spacing[1]).</div>
<div style="font-family: verdana, sans-serif; font-size: small;" class=""><br class="">
</div>
<div style="font-family: verdana, sans-serif; font-size: small;" class="">Regards,</div>
<div style="font-family: verdana, sans-serif; font-size: small;" class="">Dženan</div>
</div>
<div class=""><br class="">
<div class="">On Wed, Aug 10, 2016 at 2:40 AM, Matthias B<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:matthias.b@hotmail.com" target="_blank" class="">matthias.b@hotmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class="">
<blockquote style="border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;" class="">
<div class="">
<div dir="ltr" class="">Thank you for answering!
<div class=""><br class="">
</div>
<div class="">At this moment I get the perimeter in pixel units (not the surface area of my X,Y-data) of my labeled image.</div>
<div class="">I have also really no idea how to use my 3D data with a labeled image. <span style="font-size: 12pt;" class="">I see no way how to add 3D data to a LabelMap for example.</span></div>
<div class=""><br class="">
</div>
<div class="">This is what I have at the moment.</div>
<div class="">
<div class="">Dim labelShapeStatistics = New simple.LabelShapeStatisticsIma<wbr class="">geFilter()</div>
<div class="">labelShapeStatistics.Execute(l<wbr class="">abelImage)</div>
<div class="">Dim perimeterValue= labelShapeStatistics.GetPerime<wbr class="">ter(1)</div>
<div class=""><br class="">
</div>
<div class="">Thanks for any help, Matthias</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><br class="">
</div>
<br class="">
</div>
<div class="">
<div class="">
<hr class="">
From:<span class="Apple-converted-space"> </span><a href="mailto:blowekamp@mail.nih.gov" target="_blank" class="">blowekamp@mail.nih.gov</a><br class="">
To:<span class="Apple-converted-space"> </span><a href="mailto:matthias.b@hotmail.com" target="_blank" class="">matthias.b@hotmail.com</a><br class="">
CC:<span class="Apple-converted-space"> </span><a href="mailto:community@itk.org" target="_blank" class="">community@itk.org</a><br class="">
Subject: Re: [ITK] Determine surface area of certain region in image<br class="">
Date: Tue, 9 Aug 2016 15:58:56 +0000</div>
<div class="">
<div class=""><br class="">
<br class="">
Hello,
<div class=""><br class="">
</div>
<div class="">You should look into the label map framework [1]. In particular the LabelImageToShapeLabelMapFilte<wbr class="">r[2] and the Perimeter attribute [3] [4].</div>
<div class=""><br class="">
</div>
<div class="">HTH,</div>
<div class="">Brad</div>
<div class=""><br class="">
</div>
<div class="">[1] <a href="http://hdl.handle.net/1926/584" target="_blank" class="">http://hdl.handle.net/1926<wbr class="">/584</a></div>
<div class="">[2] <a href="https://itk.org/Doxygen/html/classitk_1_1LabelImageToShapeLabelMapFilter.html" target="_blank" class="">https://itk.org/Doxygen/ht<wbr class="">ml/classitk_1_1LabelImageToSha<wbr class="">peLabelMapFilter.html</a></div>
<div class="">[3] <a href="https://itk.org/Doxygen/html/classitk_1_1ShapeLabelObject.html#aff1209e925293c15775520ef89e97afb" target="_blank" class="">https://itk.org/Doxygen/ht<wbr class="">ml/classitk_1_1ShapeLabelObjec<wbr class="">t.html#aff1209e925293c15775520<wbr class="">ef89e97afb</a></div>
<div class="">[4] <a href="http://hdl.handle.net/10380/3342" target="_blank" class="">http://hdl.handle.net/1038<wbr class="">0/3342</a></div>
<div class=""><br class="">
<div class="">
<blockquote class="">
<div class="">On Aug 9, 2016, at 11:50 AM, Matthias B <<a href="mailto:matthias.b@hotmail.com" target="_blank" class="">matthias.b@hotmail.com</a>> wrote:</div>
<br class="">
<div class="">
<div dir="ltr" style="font-family: Calibri; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">
Hello ITK-community,
<div class=""><br class="">
</div>
<div class="">At the moment I'm working with 3D Images with following structure: 100x80x3. Every pixel contains a X,Y,Z value.<br class="">
I want to calculate the surface area of a certain region that I have defined with a boolean 2D-Image (100x80).</div>
<div class="">The surface area should only be calculated with the X,Y-data.</div>
<div class=""><br class="">
</div>
<div class="">In Matlab I have experience with this by using the function bwboundaries on the boolean image. This function determines the indices of the the boundaries in clockwise direction. Next I take the corresponding X,Y values of the indices so I can
calculate the surface area with the function polyarea. <br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Is this possbile with the ITK-library?</div>
<div class=""><br class="">
</div>
<div class="">Thank you for your help guys.</div>
<div class=""><br class="">
<table style="border-top-width: 1px; border-top-style: solid; border-top-color: rgb(211, 212, 222);" class="">
<tbody class="">
<tr class="">
<td style="width: 55px; padding-top: 18px;" class=""><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" class=""><img src="https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange_184x116-v1.png" width="46" height="29" style="width: 46px; min-height: 29px;" class=""></a></td>
<td style="width: 470px; padding-top: 17px; color: rgb(65, 66, 78); font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;" class="">
Virusvrij.<span class=""> </span><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color: rgb(68, 83, 234);" class="">www.avast.com</a></td>
</tr>
</tbody>
</table>
<a target="_blank" class=""></a></div>
</div>
<span style="font-family: Calibri; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline !important;" class="">______________________________<wbr class="">_________________</span><br style="font-family: Calibri; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">
<span style="font-family: Calibri; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; display: inline !important;" class="">Community
mailing list</span><br style="font-family: Calibri; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">
<a href="mailto:Community@itk.org" target="_blank" style="font-family: Calibri; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">Community@itk.org</a><br style="font-family: Calibri; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">
<a href="http://public.kitware.com/mailman/listinfo/community" target="_blank" style="font-family: Calibri; font-size: 16px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;" class="">http://public.kitware.com/mail<wbr class="">man/listinfo/community</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="">
______________________________<wbr class="">_________________<br class="">
Community mailing list<br class="">
<a href="mailto:Community@itk.org" target="_blank" class="">Community@itk.org</a><br class="">
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank" class="">http://public.kitware.com/mail<wbr class="">man/listinfo/community</a><br class="">
<br class="">
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
<div class=""><br class="">
<table style="border-top-width: 1px; border-top-style: solid; border-top-color: rgb(211, 212, 222);" class="">
<tbody class="">
<tr class="">
<td style="width: 55px; padding-top: 18px;" class=""><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" class=""><img src="https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange_184x116-v1.png" width="46" height="29" style="width: 46px; min-height: 29px;" class=""></a></td>
<td style="width: 470px; padding-top: 17px; color: rgb(65, 66, 78); font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;" class="">
Virusvrij.<span class="Apple-converted-space"> </span><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank" style="color: rgb(68, 83, 234);" class="">www.avast.com</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>