[GRASS-dev] problem with r.colors on Mac

Michael Barton michael.barton at asu.edu
Wed Apr 11 16:58:07 EDT 2007




On 4/11/07 4:43 AM, "Markus Neteler" <neteler at itc.it> wrote:

> On Wed, Apr 11, 2007 at 11:42:57AM +0100, Glynn Clements wrote:
>> Michael Barton wrote:
>>> 
>>> I had thought that grey.log was a histogram stretch like grey.eq. In the
>>> docs, it is called "histogram logarithmic transformed grey scale". In that
>>> sense, it seems like it should set the minimum value to black rather than 1.
>>> Thanks for the explanation. Would it be difficult to change this to stretch
>>> the image histogram rather than values of 1 to n?
>> 
>> It wouldn't be hard to change it to map log(min) to black. I'm not so
>> sure about the histogram equalisation part.
>> 
>> The main issue is whether someone might be relying upon the existing
>> behaviour.
> 
> Maybe not too much since it is "only" a color table.
>  
>> Beyond that, it would be nice to be able to apply histogram
>> equalisation and/or logarithmic scaling to any colour table, rather
>> than just grey.
> 
> Absolutely. A long standing wish...
> 
>> The existence of grey.log and grey.eq is the main reason that r.colors
>> still has separate color= and rules= options, as those two cannot be
>> implemented using rules files.
> 
> A simplification would be appreciated, but moreover support for FP map
> histogram equalisation etc.
> 

I agree with Markus. For r.colors behavior, I suggest ultimately:

map= [name of raster to set color table]

colors= [name of predefined color tables] (merge current rules and colors)

stretch= [grey.eq,color.eq, grey.log, color.log, other?] (put grey.eq and
grey.log here)

rast= [import color table of this raster]

rules= [import user defined color table] (add a gui "prompt" for browse
button)

For backward compatibility in the 6.x series, we'd have to leave grey.eq and
grey.log as valid settings for the colors argument. I suppose we'd have to
leave in the current list of predefined rules files as valid for the rules
argument. 

Michael

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list