[vtkusers] scalars from PointData
Philippe Pouletaut
philippe.pouletaut at utc.fr
Tue Mar 23 13:06:17 EST 2004
Hi all,
I'm using vtk4.2 in c++ for color mapping.
I actually use the ElevationFilter and would like to copy the output of
distance map into a float array.
The distance data are stored in a DataSet object called colorIt, with
the scalars name "Elevation".
The method colorIt->GetInput()->GetPointData()->GetScalars() returns a
DataArray object.
If I write:
vtkDataArray *DistScalars =
colorIt->GetInput()->GetPointData()->GetScalars();
I get memory problem.
If I write
float *FirstValue =
colorIt->GetInput()->GetPointData()->GetScalars()->GetTuple(0);
the same problem occurs.
How does I read the scalars "Elevation" ?
Many thanks for your help
Philippe
More information about the vtkusers
mailing list