[vtkusers] Rendering raw X-ray problem
Amy Henderson
amy.henderson at kitware.com
Fri Oct 10 11:16:30 EDT 2003
It sounds like you're looking for vtkImageShiftScale.
- Amy
At 04:04 PM 10/10/2003 +0100, John Vard wrote:
>Thanks for that Jens.. That solution never occurred to me. I take it the
>method GetScalarRange() could be used to determine the original [min,max]
>however I'm intrigued as to how you went about replacing the scalar values..
>
>On Friday 10 October 2003 15:05, you wrote:
> > 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
>
>--
>
>Trinity Centre for Bioengineering
>Mechanical Engineering Dept.
>Trinity College
>Dublin 2
>Ireland
>
>e-mail: jvard at tcd.ie
>www.biomechanics.ie
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list