[vtkusers] Accessing the data in an image file

Kevin Teich kteich at cortechs.net
Thu May 9 10:13:05 EDT 2002


[Thomas Deschamps]
> I would liks to know how to access the scalar values in one dataset.
> I have a 3D structured points dataset (a medical image). I would like to
> obtain a pointer (vtkDataArray *) to the values in the dataset, or a way
> to obtain the scalar value, at one point (i,j,k) in the dataset.

In Tcl, I would use:

set dataPoints [reader GetOutput]
set value [$dataPoints GetScalarComponentAsFloat $x $y $x 0]

--
Kevin





More information about the vtkusers mailing list