[vtkusers] How to get the cg of a surface
Hendrik Belitz
h.belitz at fz-juelich.de
Mon Jun 6 04:10:36 EDT 2005
Am Sonntag, 5. Juni 2005 09:02 schrieb An Jiye:
> Hi, everyone.
>
> I have used Marching Cubes alogrithm to extract an iso-surface.
> It is the surface of some object.
> Now I want to get the cg of this surface, how can I?
>
> Or I can calculate the center of gravity myself,
> but I need the coordinate of each pixel on the surface to do so.
No you don't the pixel coordinates. You only need the coordinates of all
points (remember that you have a triangulated surface here) which can be
extracted directly from the vtkPolyData structure. Doing this on a pixel
basis indeed will give you the wrong results.
Regards
Hendrik Belitz
More information about the vtkusers
mailing list