[vtkusers] Re: Trouble getting curvatures from vtkCurvatures

Goodwin Lawlor goodwin.lawlor at ucd.ie
Fri Jan 12 07:04:16 EST 2007


Hi Mark,
> However doing a similar thing for curvatures isn't working:
> 
> vtkFloatArray* myPointCurvatures =
> vtkFloatArray::SafeDownCast(myCurvatures->GetOutput()->GetPointData()->GetScalars()); 
> 
> float* curvature=new float[1];
> myPointCurvatures ->GetTupleValue(j,curvature);
> 
> the SafeDownCast is returning a null pointer, which makes me think
> that I haven't got vtkCurvatures doing the right thing. However

vtkCurvatures uses doubles so:

vtkDoubleArray* myPointCurvatures = 
vtkDoubleArray::SafeDownCast(myCurvatures->GetOutput()->GetPointData()->GetScalars());

should work.

hth,

Goodwin




More information about the vtkusers mailing list