AW: [vtkusers] scalar value ??????

Waltraud Henrich henrich at ira.uka.de
Thu Sep 26 06:42:59 EDT 2002


My problem is, that I know the coordinates of an pixel (vtkImageData) and I
want to know the scalar value (gray value) of this pixel. How can I get this
gray value?

Thanks a lot :-) 
Waltraut


-----Ursprüngliche Nachricht-----
Von: Jeremy Winston [mailto:winston at cat.rpi.edu]
Gesendet: Freitag, 20. September 2002 14:35
An: Waltraud Henrich
Cc: 'vtkusers at public.kitware.com'
Betreff: Re: [vtkusers] scalar value ??????


Waltraud Henrich wrote:
> 
> I would like get the scalar value at the mouse cursor when I click
> the mouse button.  I can get the pixel coordinates .

The scalar value of what?

If you want the scalar value of the closest pickable thing,
use vtkCellPicker to pick a cell, and query the scalar value
of the points of that cell.

See 
http://public.kitware.com/cgi-bin/cvsweb.cgi/~checkout~/VTK/Examples/Annotat
ion/Tcl/annotatePick.tcl

for an example of vtkCellpicker's use.

HTH,
-Jeremy



More information about the vtkusers mailing list