[vtk-developers] Find center of polydata
Laurent Chauvin
lchauvin at bwh.harvard.edu
Mon Mar 11 18:20:02 EDT 2013
Hello Kenneth,
Thank you for your explanations.
However, when I meant on the surface, I was not taking about the center.
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).
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.
I don't know if it's clearer.
If it's not, let me know I will try to make a 3D drawing.
Thank you very much.
-Laurent
On Mon, Mar 11, 2013 at 2:37 PM, Moreland, Kenneth <kmorel at sandia.gov>wrote:
> Laurent,
>
> (This discussion is probably more appropriate to VTK users, so I'm
> forwarding it there.)
>
> Although, I don't know for sure, but I suspect that the short answer to
> your question is no.
>
> 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.
>
> 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.
>
> 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).
>
> -Ken
>
> From: Laurent Chauvin <lchauvin at bwh.harvard.edu>
> Date: Monday, March 11, 2013 10:43 AM
> To: VTK Developers Developers <vtk-developers at vtk.org>
> Subject: [EXTERNAL] [vtk-developers] Find center of polydata
>
> Hello,
>
> I would like to know if there is a vtk object that can find the center
> of the vtkPolyData.
> I've seen there is vtkCenterOfMass but I'm not sure it's gonna fit.
>
> 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.
> What I would like is a "local" center, like this (the green one, not the
> red):
>
> I would like to do this without having to define a ROI.
> 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.
>
> Is there any tool like this ?
>
> Thank you very much.
> -Laurent
>
>
>
>
--
Laurent Chauvin, MS
Surgical Navigation and Robotics Laboratory, Radiology
Brigham And Women's Hospital, Harvard Medical School
http://wiki.ncigt.org/index.php/User:Lchauvin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130311/e86a5e36/attachment.html>
More information about the vtk-developers
mailing list