[vtkusers] Associating vtkCurvatures to surface structure
Max
teegee.max at gmail.com
Thu Nov 4 08:07:27 EDT 2010
On 04/11/10 12:54, David Doria wrote:
> On Thu, Nov 4, 2010 at 4:18 AM, Max <teegee.max at gmail.com> wrote:
>
>> Hi list,
>>
>> the scalars of the vtkPolyData, the output of vtkCurvatures, contain
>> the values of the (selected type of) curvature, if I understand
>> correctly. I am looking for the way to associate each curvature value to
>> a specific region of the surface (vertex/triangle/edge). Could you point
>> me in the right direction please?
>>
>> On a related note, is there a way to make vtkCurvature compute both
>> curvatures (i.e. mean and Gaussian) at the same time, instead of just
>> one of them?
>>
>
> I think you just need to
>
> polydata->GetPointData()->SetActiveScalars("YourArrayName")
>
> to color the points by an array (
> and polydata->GetCellData()->SetActiveScalars("YourArrayName") if the array
> is the same length as (and attached to) the triangles instead of the points)
>
Thanks! Not exactly what I'm looking for (I don't need to colour the
surface - I need the numbers), but I think I get the drill: set active
scalars, then extract them on a point-by-point basis (i.e., per vertex).
All that remains is finding all triangles and edges sharing that
vertex... the edges I think I would get from vtkExtractEdges, but any
hints about triangles would be greatly appreciated.
Thanks!
More information about the vtkusers
mailing list