[vtkusers] Rendering raw X-ray problem

Jens Fisseler fisseler at rob.uni-luebeck.de
Fri Oct 10 10:05:03 EDT 2003


Hi John,

> I'm having difficulty displaying X-rays in raw file format. To display the 
> image in the render window vtkImageActor demands that the scalar type of the 
> image be set to Unsigned Character. Yet this appears to alter the display 
> colouring. Firstly can anybody explain why the image is being altered and how 
> can I overcome this?? Really would appreciate some help on this. It's doing 
> my head.. Ta

I ran into the same problem during my first attempts with VTK some time
ago. The scalar values of your raw image probably contain values greater
than 255, the maximum value an unsigned char can represent. So the
higher bits of some pixels get truncated and you get color distortions.

My solution to this problem was to find the maximum scalar value and to
scale the interval [0,max] to the interval [0,255]. But perhaps someone
has a better solution?

	Jens

-- 
==================================================================
Institute for Robotics and Cognitive Systems -- University Luebeck
------------------------------------------------------------------
Jens Fisseler                tel:                 +49 451 500 3724
Research Assistant           secretary:           +49 451 500 3720
University Luebeck           fax:                 +49 451 500 3722
Ratzeburger Allee 160        mail:     fisseler at rob.uni-luebeck.de
D-23538 Luebeck, Germany     www:    http://www.rob.uni-luebeck.de
==================================================================




More information about the vtkusers mailing list