<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; ">Thank you for your reply.<div><br></div><div>I checked the paper, and it looks good, but the problem is that it's requiring iterations, and as I try to create something quiet general, I cannot really tell how many iterations will be required, it will depends on the shape I think.</div><div><br></div><div><div>
<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; "><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; "><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></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Mar 11, 2013, at 6:42 PM, "Moreland, Kenneth" &lt;<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">

<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div>
<div>I understand your description, but I'm a little unsure whether by center you mean the line that follows the center of the tube or some specific point on that line.</div>
</div>
</div>
<div><br>
</div>
<div>There are probably easier ways to do this if your geometry is constrained or your center location is constrained, but it sounds like a skeleton extraction method may give you what you want. &nbsp;I don't know of any implementation in VTK (someone on the mailing
 list please correct me if I'm mistaken), but a brief web search led to this paper that looks like it can find the center line of your tube:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px;" type="cite">
<div><a href="http://visgraph.cse.ust.hk/projects/skeleton">http://visgraph.cse.ust.hk/projects/skeleton</a>/</div>
</blockquote>
<div><br>
</div>
<div>Hope that helps.</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; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223); ">
<span style="font-weight:bold">From: </span>Laurent Chauvin &lt;<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>&gt;<br>
<span style="font-weight:bold">Date: </span>Monday, March 11, 2013 4:20 PM<br>
<span style="font-weight:bold">To: </span>Kenneth Moreland &lt;<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>&gt;<br>
<span style="font-weight:bold">Cc: </span>VTK Developers Developers &lt;<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a>&gt;, "<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>" &lt;<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] Re: [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;" type="cite">
<div>
<div>
<div dir="ltr">Hello Kenneth,
<div><br>
</div>
<div style="">Thank you for your explanations.</div>
<div style="">However, when I meant on the surface, I was not taking about the center.</div>
<div style=""><br>
</div>
<div style="">My goal is not to have the center of the complete polydata, because if it's a U shape or S shape for example, the center could be in empty space (between the two | of the U).&nbsp;</div>
<div style="">For example, let's say the U shape is a tube with a U shape. I don't want the center of the U shape, but the center of the tube, all along the U shape.</div>
<div style=""><br>
</div>
<div style="">I don't know if it's clearer.</div>
<div style=""><br>
</div>
<div style="">If it's not, let me know I will try to make a 3D drawing.</div>
<div style=""><br>
</div>
<div style="">Thank you very much.</div>
<div style="">-Laurent</div>
<div style=""><br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Mar 11, 2013 at 2:37 PM, Moreland, Kenneth <span dir="ltr">
&lt;<a href="mailto:kmorel@sandia.gov" target="_blank">kmorel@sandia.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" type="cite">
<div style="font-size:14px;font-family:Calibri,sans-serif;word-wrap:break-word">
<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. &nbsp;Center of mass is well defined even if, as you stated, there is no guarantee that it in the mass or on the surface. &nbsp;I'm not sure what you mean by "center… close to the
 fiducial". &nbsp;Center, by any definition, is absolute relative to an object. &nbsp;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. &nbsp;First, you can find the polygon cell close to or under a selected position and find the center of that polygon. &nbsp;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. &nbsp;You could then extract those cells within the region and take the center of that. &nbsp;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>
<div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span>Laurent Chauvin &lt;<a href="mailto:lchauvin@bwh.harvard.edu" target="_blank">lchauvin@bwh.harvard.edu</a>&gt;<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 &lt;<a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span>[EXTERNAL] [vtk-developers] Find center of polydata<br>
</div>
<div>
<div class="h5">
<div><br>
</div>
<blockquote style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5" type="cite">
<div>
<div style="word-wrap:break-word">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 height="241" width="458"></div>
<div>I would like to do this without having to define a ROI.&nbsp;</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 style="font-family:Helvetica;font-size:medium">
<div style="word-wrap:break-word"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div style="word-wrap:break-word"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<div style="word-wrap:break-word">
<div>-Laurent</div>
<div><br>
</div>
</div>
</span></div>
</span></div>
</span></div>
</span></div>
</span><br>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</span></div>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>Laurent Chauvin, MS</div>
<div>Surgical Navigation and Robotics Laboratory, Radiology</div>
<div>Brigham And Women's Hospital, Harvard Medical School<br>
</div>
<div><a href="http://wiki.ncigt.org/index.php/User:Lchauvin" target="_blank">http://wiki.ncigt.org/index.php/User:Lchauvin</a></div>
</div>
</div>
</div>
</blockquote>
</span>
</div>

</blockquote></div><br></div></body></html>