Colour Maps

New Message Reply Date view Thread view Subject view Author view

C I Knowles (msczcik@scs.leeds.ac.uk)
Wed, 21 Jul 1999 15:29:47 +0100


I wondered if anyone could explain the following:

I might be being stupid and its only a small mistake but....

I've been experimenting with using a look up table with datasets of
different types and have some strange results (voRenderingMode is
MONOCHROME). When using voDataType of BYTE there are no problems - the
CT.Head.Small.char.tif dataset is displayed correctly with the look up
table disabled and enabled.

However, to extend my code I want it to be able to cope with data of
different types. Hence I used the same dataset (CT.Head.Small.char.tif)
and changed it to float, before copying into the bricks. My code
actually receives a pointer to the data which is in memory already -
I've written a routine to copy it into the bricks.

So the data which I'm sticking in the bricks is of type FLOAT and is
between 256 and 0 as all I've done is cast it. The following occurs...

With the lookuptable disabled I get a mess.... the head is just about
there but there are obvious problems with grey level values. What seems
to be happening is grey levels are assigned for 0 to 1 properly but not
for values greater than 1. This should be expected I believe. To check
this I cast the data to type float as before and also scaled it to
between 0 and 1 manually before reading into the bricks, the head is
then displayed correctly. Hence when using voDataType float it works if
values are between 0 and 1.

So I thought I should now be able to load the float data into the bricks
with values between 0 and 256, scale it to between 0 and 1 using the
'voAppearanceActions::dataScaleRange' method and get the same results.
But I don't......(see attached pic1.gif). It looks as though the grey
levels are assigned before the data is scaled to between 0 and 1, like
before. If this is the case what is the use of the
'voAppearanceActions::dataScaleRange' method? Or am I making a mistake?

Thanks,

Chris



New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Nov 01 1999 - 14:11:13 PST