🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.khoros
Article #1057

Re: colormaps?

#1057
From: Peter Averkamp
Date: Mon, 11 Jan 1993 12:05
68 lines
3473 bytes
On Jan 8, 23:11, John C. Schultz wrote:
{ Subject: colormaps?
> Basically I do not understand how colormaps should/can be used.  For a
> single band image is it valid to think of them as a lookup table?
Yes.

> What is used if the colormap is OPTIONAL?  For example the kitten
> image distributed with Khoros looks the same on an 8 bit SPARC display
> whether I use the colormap or not.   Why?
> 
Because the map type of the kitten image is of type FORCE. This, as the
name implies, forces the use of the map.  If a viff file specifies the
map(s) as OPTIONAL, the application is free to either use it or not;
putimage, e.g. has a control flag '-use_cmap {t/f}' that controls this
behaviour. In the case of FORCEd maps, this is meaningless.

> These questions are driven by my desire to include the histogram of
> the image as part of a VIFF image.  One technique which comes to mind is
> to incorporate the histogram as a color map but I am not sure what the
> effect will be.
> 
> I also wanted to use a color map to display the relevant portion of
> an image so each of my images would have two (optional) colormaps.
> 
> Taking an example of what I want to do.
> - ----------------------------------------------------------------------
> My 16 bit image has actual data in the gray level region from pixel
> value = 10,000 to 12,000. I can make a color map that linearly
> maps this [10K,12K] gray level region to 8 bit data for display.  Do I
> lose the original data?
Depends. If you apply this map for display only, no. There is of
course a loss of data on the display as 2000 different colours/gray levels
cannot be displayed on a 8 bit display, but your data remain unchanged.
If you attach a map to your data and then process it, yes. Mapping data
completely changes their meaning from data to pointers into a table. Even
the data storage type can be changed this way from e.g. shorts to floats.

> Can I do this mapping? Waht data does
> EDITIMAGE see - the 8 bit or the 16 bit? 
Editimage gets the 16bit data but maps them according to the map. So the
data you interactively work with is the result from the mapping process(8bit).

> What happens if I use
> the second map (which must be of type LONG or FLOAT) to store the
> histogram? I only want 8 bits of data for the display but the "other"
> colormap (which is actually a histogram) must be at least 4 bytes/entry.
You cannot have two different data storage types for maps in a single
viff file. As the Histogram is not really a map anyway, i'd suggest writing
it into another file.

> 
> Thanks.
> - --
>    John C. Schultz   +1 (612) 733-4047   schultz@halley.serc.3m.com
>    How to include the taste of Glendronach in a multi-media system?
}-- End of excerpt from John C. Schultz


Hope this helps,

 Peter Averkamp


-- 
Peter Averkamp,                      | email:
Physics Department E20               | petav@radon.e20.physik.tu-muenchen.de
Techn. Univ. of Munich               | Phone: ++49 (89) 3209-2408 and -2814
D-8046 Garching, Germany             | Fax:   ++49 (89) 3209-2338
Technical Details
Message-ID: <42534@pprg.eece.unm.edu.pprg.unm.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!caen!destroyer!fmsrl7!lynx.unm.edu!pprg.unm.edu!daemon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!caen!destroyer!fmsrl7!lynx.unm.edu!pprg.unm.edu!daemon
From: Peter.Averkamp@e20.physik.tu-muenchen.de (Peter Averkamp)
Newsgroups: comp.soft-sys.khoros
Subject: Re: colormaps?
Message-ID: <42534@pprg.eece.unm.edu.pprg.unm.edu>
Date: 11 Jan 93 12:05:09 GMT
Sender: news@pprg.unm.edu
Lines: 68