[vtkusers] Re: extract the curvature value

Goodwin Lawlor goodwin.lawlor at ucd.ie
Sun Feb 27 13:00:48 EST 2005


Hi Yasser,

> Now i need to extract the curvature value at each point of 3d volume which
> represented by vtkPolyData object.

In VTK a 3D volume would be represented by a vtkImageData. Do you mean you
have a closed surface?

> can I do that from vtkCurvatures? if yes, How?

If you have a surface, you can use vtkCurvatures to get the Min, Max,
Gaussian, and Mean curvature. You can use the class like you would any
filter.

In tcl:

vtkCurvatures curv
    curv SetInput [reader GetOutput]
    curv SetCurvatureTypeToGaussian
    curv Update

# to access the data points
set data [[[curv GetOutput] GetPointData] GetScalars]
set num [data GetNumberOfTuples]

for {set i 0} {$i < $num} {incr i} {
    $data GetTuple1 $i
}

hth

Goodwin






More information about the vtkusers mailing list