Re: FLOAT images instead of BYTE ones from IDL Object graphics ? [message #64835 is a reply to message #64834] |
Fri, 23 January 2009 08:29   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Gianluca Li Causi writes:
> Ok, so I think that a practical example could help: the following
> program makes a spherical volume made of concentric shells, following
> a sin(radius) law.
>
> I use a linear grayscale as RGB_TABLE so that the maximum value is
> white and the minimum is black.
> Then I also use a linear Opacity from 0 to 15, because I want to well
> view throug all the shells until the center.
>
> As you see, the final image is a byte array and its maximum value is
> 142.
> In my application the maximum gray is in the range 10 to 20, but I
> want an image with 256 gray levels not only 10 or 20 grays.
OK, two things. First, there is no requirement that the
volume argument is required to be a byte array. A float
array, scaled from 0 to 65535 works just as well in your
example.
To *display* the data, of course, it has to be scaled
into the range of 0 to 255, as all data does to be
displayed in a graphics window of a normal, off-the-
shelf computer. Naturally, the values you read *out*
of the window will be in this range.
The *particular* value you read back from the window
is indicative of the shade of gray that was used to
render that particular pixel. This rendering choice
is a function of the color of the objects, the
way the opacity table is being used to modify the
value of the pixels, the composite function, and the
lighting you are using on your model.
I see nothing here to cause me to retract my earlier
statement that you are confusing data with the display
of the data. Sorry.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|