[vtkusers] Show image in grey scale

David Brayford dbrayford at gmail.com
Mon Sep 12 10:13:15 EDT 2011


Hi,

I have a grey scale X-Ray image that when I load it into vtk the image
is multi-coloured and was wondering how I can show the image as a
plane grey scale x-ray image.

Below is the code:

			xray.imagePlane->SetCenter( temp );
			xray.mapper->SetInput(xray->GetOutput());
			xray.actor->SetTexture( imageTexture );
			xray.actor->SetMapper(xray].mapper);
			xray.actor->GetProperty()->SetOpacity(0.8);

Thanks
David



More information about the vtkusers mailing list