<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; ">Hi David,<div><br></div><div>Yes, you're right. What I was trying to find is the medial axis of the shape. Can this axis be a curve ?</div><div><br></div><div>My problem is, I want to display a plane around the polydata model, but as I explained, like the green one, not the red one:</div><div><br></div><div><img id="187ef5e9-e7b3-4273-9df3-49490ebc1c74" height="244" width="498" apple-width="yes" apple-height="yes" src="cid:E23580B8-E296-44AF-9270-9E5FC3BD56EA@bwh.harvard.edu"></div><div><br></div><div>I would like my plane to "follow" the mesh (that's why I was trying to find the medial axis, to use it as the center of my plane).</div><div>Maybe instead of placing the center, I can place the top-left and bottom-right corner of my plane.</div><div><br></div><div>What I'm trying to achieve is having a plane "following" the mesh.</div><div>For example, I want to be able to move the "black" plane on the drawing along the green U shape.</div><div><br></div><div>Thank you.</div><div><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><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 12, 2013, at 12:02 AM, David Thompson &lt;<a href="mailto:david.thompson@kitware.com">david.thompson@kitware.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Laurent,<br><br>I think you mean that you are looking for a point on the medial axis of the shape. VTK does not have a filter to compute medial axes that I am aware of. It is generally not considered numerically well-conditioned for polyhedral meshes as small changes in the surface polygonization can lead to large changes in the shape of the medial axis.<br><br>Also, as the name suggests, the medial axis is generally not a single point. There are other techniques for parameterizing shapes along their "longitudinal" axes. The closest thing that comes to mind is the Reeb graph filter in VTK ( <a href="https://visimp.cs.unc.edu/2010/10/26/reeb-graphs/">https://visimp.cs.unc.edu/2010/10/26/reeb-graphs/</a> ) but it requires you to have a scalar field that defines the start and end points of graph edges embedded in the model (as illustrated by the link above). Some applications ( <a href="http://www.mcs.anl.gov/uploads/cels/papers/scidac11/final/bennett_janine.scidac.pdf">http://www.mcs.anl.gov/uploads/cels/papers/scidac11/final/bennett_janine.scidac.pdf</a> ) use eigenvectors of point coordinates to come up with such a scalar field.<br><br><span class="Apple-tab-span" style="white-space:pre">        </span>David<br><br>On Mar 11, 2013, at 6:22 PM, Laurent Chauvin &lt;<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>&gt; wrote:<br><br><blockquote type="cite">Hello Kenneth,<br><br>Thank you for your explanations.<br>However, when I meant on the surface, I was not taking about the center.<br><br>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). <br>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.<br><br>I don't know if it's clearer.<br><br>If it's not, let me know I will try to make a 3D drawing.<br><br>Thank you very much.<br>-Laurent<br><br><br>On Mon, Mar 11, 2013 at 6:20 PM, Laurent Chauvin &lt;<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>&gt; wrote:<br>Hello Kenneth,<br><br>Thank you for your explanations.<br>However, when I meant on the surface, I was not taking about the center.<br><br>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). <br>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.<br><br>I don't know if it's clearer.<br><br>If it's not, let me know I will try to make a 3D drawing.<br><br>Thank you very much.<br>-Laurent<br><br><br><br>On Mon, Mar 11, 2013 at 2:37 PM, Moreland, Kenneth &lt;<a href="mailto:kmorel@sandia.gov">kmorel@sandia.gov</a>&gt; wrote:<br>Laurent,<br><br>(This discussion is probably more appropriate to VTK users, so I'm forwarding it there.)<br><br>Although, I don't know for sure, but I suspect that the short answer to your question is no.<br><br>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.<br><br>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.<br><br>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).<br><br>-Ken<br><br>From: Laurent Chauvin &lt;<a href="mailto:lchauvin@bwh.harvard.edu">lchauvin@bwh.harvard.edu</a>&gt;<br>Date: Monday, March 11, 2013 10:43 AM<br>To: VTK Developers Developers &lt;<a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a>&gt;<br>Subject: [EXTERNAL] [vtk-developers] Find center of polydata<br><br>Hello,<br><br>I would like to know if there is a vtk object that can find the center of the vtkPolyData.<br>I've seen there is vtkCenterOfMass but I'm not sure it's gonna fit.<br><br>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.<br>What I would like is a "local" center, like this (the green one, not the red):<br><br><br>I would like to do this without having to define a ROI. <br>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.<br><br>Is there any tool like this ?<br><br>Thank you very much.<br>-Laurent<br><br><br><br><br><br><br>-- <br>Laurent Chauvin, MS<br>Surgical Navigation and Robotics Laboratory, Radiology<br>Brigham And Women's Hospital, Harvard Medical School<br><a href="http://wiki.ncigt.org/index.php/User:Lchauvin">http://wiki.ncigt.org/index.php/User:Lchauvin</a><br><br><br><br>-- <br>Laurent Chauvin, MS<br>Surgical Navigation and Robotics Laboratory, Radiology<br>Brigham And Women's Hospital, Harvard Medical School<br>http://wiki.ncigt.org/index.php/User:Lchauvin<br>_______________________________________________<br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br><br>Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.vtk.org/mailman/listinfo/vtkusers<br></blockquote><br></blockquote></div><br></div></body></html>