[vtkusers] elp:How to get the gray value of a special point basedon VTK

JULIO DANIEL judagica at hotmail.com
Mon Nov 29 16:59:37 EST 2004


you may be use:
GetScalarPointer(i,j,k));,
you have to know the type of data ( float, short, int........)

example (for a reader of short data) you have  to use

short *Pixel;

Pixel = (short *)(reader->GetOutput()->GetScalarPointer(i,j,k));

i, j, and k are the image index

now we have a array of 3 components (R,G,B) or array of 1 component if you 
use a gray image.

to modifie you use.
Pixel[0]=value  modifie the R component or the gray value.


good Luck



Daniel

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the vtkusers mailing list