[vtkusers] (no subject)

lappadj at libero.it lappadj at libero.it
Thu Oct 18 10:51:16 EDT 2001


> Hi
> Is it possible to get a value of a pixel from an image, to modify it 
and 
> then to write it to the Image?

Hi,
to get a value of the pixell:
vtkImageReader *reader = vtkImageReader::New();
 reader->SetDataByteOrderToLittleEndian();
 reader->SetDataExtent(....);
 reader->SetFilePrefix("c/.../image");
 reader->SetDataMask(0x7fff);
 reader->Update();
 reader->GetOutput()->GetScalarPoint(x,y,z);
But to change this value you can try with SetScalarPoint(x,y,z),or copy 
into new image all pixell value including the new value.
 
 




More information about the vtkusers mailing list