<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Matthias,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">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 class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 10, 2016 at 2:40 AM, Matthias B <span dir="ltr"><<a href="mailto:matthias.b@hotmail.com" target="_blank">matthias.b@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">Thank you for answering!<div><br></div><div>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>I have also really no idea how to use my 3D data with a labeled image. <span style="font-size:12pt">I see no way how to add 3D data to a LabelMap for example.</span></div><div><br></div><div>This is what I have at the moment.</div><div><div>Dim labelShapeStatistics = New simple.<wbr>LabelShapeStatisticsImageFilte<wbr>r()</div><div>labelShapeStatistics.Execute(<wbr>labelImage)</div><div>Dim perimeterValue= labelShapeStatistics.<wbr>GetPerimeter(1)</div><div><br></div><div>Thanks for any help, Matthias</div><div><br></div><div class="hm HOEnZb"><div><br></div><br></div><div><div class="hm HOEnZb"><hr>From: <a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a><br>To: <a href="mailto:matthias.b@hotmail.com" target="_blank">matthias.b@hotmail.com</a><br>CC: <a href="mailto:community@itk.org" target="_blank">community@itk.org</a><br>Subject: Re: [ITK] Determine surface area of certain region in image<br>Date: Tue, 9 Aug 2016 15:58:56 +0000</div><div><div class="h5"><br><br>




Hello,
<div><br>
</div>
<div>You should look into the label map framework [1]. In particular the LabelImageToShapeLabelMapFilte<wbr>r[2] and the Perimeter attribute [3] [4].</div>
<div><br>
</div>
<div>HTH,</div>
<div>Brad</div>
<div><br>
</div>
<div>[1] <a href="http://hdl.handle.net/1926/584" target="_blank">http://hdl.handle.net/<wbr>1926/584</a></div>
<div>[2] <a href="https://itk.org/Doxygen/html/classitk_1_1LabelImageToShapeLabelMapFilter.html" target="_blank">https://itk.org/Doxygen/<wbr>html/classitk_1_<wbr>1LabelImageToShapeLabelMapFilt<wbr>er.html</a></div>
<div>[3] <a href="https://itk.org/Doxygen/html/classitk_1_1ShapeLabelObject.html#aff1209e925293c15775520ef89e97afb" target="_blank">https://itk.org/Doxygen/<wbr>html/classitk_1_<wbr>1ShapeLabelObject.html#<wbr>aff1209e925293c15775520ef89e97<wbr>afb</a></div>
<div>[4] <a href="http://hdl.handle.net/10380/3342" target="_blank">http://hdl.handle.net/<wbr>10380/3342</a></div>
<div><br>
<div>
<blockquote>
<div>On Aug 9, 2016, at 11:50 AM, Matthias B <<a href="mailto:matthias.b@hotmail.com" target="_blank">matthias.b@hotmail.com</a>> wrote:</div>
<br>
<div>
<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">
Hello ITK-community,
<div><br>
</div>
<div>At the moment I'm working with 3D Images with following structure: 100x80x3. Every pixel contains a X,Y,Z value.<br>
I want to calculate the surface area of a certain region that I have defined with a boolean 2D-Image (100x80).</div>
<div>The surface area should only be calculated with the X,Y-data.</div>
<div><br>
</div>
<div>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>
</div>
<div><br>
</div>
<div>Is this possbile with the ITK-library?</div>
<div><br>
</div>
<div>Thank you for your help guys.</div>
<div><br>
<table style="border-top-width:1px;border-top-style:solid;border-top-color:rgb(211,212,222)">
<tbody>
<tr>
<td style="width:55px;padding-top:18px"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" target="_blank"><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"></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">
Virusvrij.<span> </span><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail" style="color:rgb(68,83,234)" target="_blank">www.avast.com</a></td>
</tr>
</tbody>
</table>
<a></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">______________________________<wbr>_________________</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">
<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">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">
<a href="mailto:Community@itk.org" 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" target="_blank">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">
<a href="http://public.kitware.com/mailman/listinfo/community" 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" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/community</a></div>
</blockquote>
</div>
<br>
</div></div></div></div></div>                                      </div></div>
<br>______________________________<wbr>_________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/community</a><br>
<br></blockquote></div><br></div>