[vtkusers] color mapping

Philippe Pouletaut philippe.pouletaut at utc.fr
Wed Mar 24 09:08:59 EST 2004


Hi all,

I'm using vtk4.2 in c++ on Windows 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:
	float dist0;
	dist0 = colorIt->GetInput()->GetPointData()->GetScalars("Elevation")->GetTuple1(0);
I get memory problem.

How does I read the scalars "Elevation" ?

Many thanks for your help,

Philippe




More information about the vtkusers mailing list