<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div>
<div>Laurent,</div>
<div><br>
</div>
<div>(This discussion is probably more appropriate to VTK users, so I'm forwarding it there.)</div>
</div>
</div>
<div><br>
</div>
<div>Although, I don't know for sure, but I suspect that the short answer to your question is no.</div>
<div><br>
</div>
<div>The problem is that you have not given a clear definition of what "center" means. Center of mass is well defined even if, as you stated, there is no guarantee that it in the mass or on the surface. I'm not sure what you mean by "center… close to the
fiducial". Center, by any definition, is absolute relative to an object. It is either close or not close.</div>
<div><br>
</div>
<div>I can think of two approaches that might satisfy what you are asking for. First, you can find the polygon cell close to or under a selected position and find the center of that polygon. As long as the polygon is planar and concave, this center will lie
on that polygon.</div>
<div><br>
</div>
<div>Otherwise, perhaps you mean the center relative to part of the object within some region around the selected point. You could then extract those cells within the region and take the center of that. Be wary, though, that the center is still not guaranteed
to be located on the surface (and is most likely not going to be if the surface is not in a plane).</div>
<div><br>
</div>
<div>-Ken</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Laurent Chauvin <<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>><br>
<span style="font-weight:bold">Date: </span>Monday, March 11, 2013 10:43 AM<br>
<span style="font-weight:bold">To: </span>VTK Developers Developers <<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a>><br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] [vtk-developers] Find center of polydata<br>
</div>
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Hello,
<div><br>
</div>
<div>I would like to know if there is a vtk object that can find the center of the vtkPolyData.</div>
<div>I've seen there is vtkCenterOfMass but I'm not sure it's gonna fit.</div>
<div><br>
</div>
<div>My concern is if I use a U shape dataset (or S shape, or another strange shape), I feel like the center returned will be in the middle of the U.</div>
<div>What I would like is a "local" center, like this (the green one, not the red):</div>
<div><br>
</div>
<div><img id="90b19dda-5044-467f-a2bf-5593163226b5" height="241" width="458" apple-width="yes" apple-height="yes" src="cid:B4836B0F-1B68-4637-B882-1ADA129D756D@bwh.harvard.edu"></div>
<div>I would like to do this without having to define a ROI. </div>
<div>I would like for example to place a fiducial on model, and then, find the center of the model close to the fiducial I placed.</div>
<div><br>
</div>
<div>Is there any tool like this ?</div>
<div><br>
</div>
<div>Thank you very much.<br>
<div><span class="Apple-style-span" style="font-family: Helvetica; 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: Helvetica; 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 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: Helvetica; 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 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: Helvetica; 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 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: Helvetica; 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 style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>-Laurent</div>
<div><br>
</div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span><br class="Apple-interchange-newline">
</div>
<br>
</div>
</div>
</div>
</blockquote>
</span>
</body>
</html>