MC,<br><br>Instead of the bounding box, it might be better to use the GetRegion() method of LabelStatisticsImageFilter. This will save you from having to create a region from the bounding box.<br><br>Bill<br><br><div class="gmail_quote">
On Nov 29, 2007 5:11 PM, Mengchen Zhu &lt;<a href="mailto:acidwind@gmail.com">acidwind@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi everyone,<br><br>I am now trying to extract the regional centers of mass of a labeled image (output of ConnectedComponentImageFilter and RelabelComponentImageFilter). Are there any &quot;direct&quot; ways of doing this? 
<br><br>My current plan is to first calculate the bounding boxes of each region using LabelStatisticsImageFilter; and then either manually compute the CoM, or &quot;convert&quot; the region inside the bounding box to image, and use ImageMomentsCalculator to calculate the CoM. I don&#39;t know how to do the conversion exactly for the 2nd method. The 2nd method is favored somehow because I might need other attributes from ImageMomentsCalculator such as principal axes. 
<br><br>The context: I am currently working on registration using ICP; the extracted centers of mass will serve as inputs to the registration process.<br><br>Your comments are welcomed. Thanks.<br><br>Regards,<br>MC<br>
<br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">
http://www.itk.org/mailman/listinfo/insight-users</a><br><br></blockquote></div><br>