comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: FLOAT images instead of BYTE ones from IDL Object graphics ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
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 Go to previous messageGo to previous message
David Fanning is currently offline  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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Problems with array elements as parameter in c++ function used via call_external
Next Topic: Re: String Formatting

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 04:52:16 PDT 2025

Total time taken to generate the page: 1.68093 seconds