GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71785
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
color_hist.c File Reference

Raster Library - histogram grey scale colors. More...

#include <math.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/colors.h>
Include dependency graph for color_hist.c:

Go to the source code of this file.

Functions

void Rast_make_histogram_eq_colors (struct Colors *colors, struct Cell_stats *statf)
 Make histogram-stretched grey colors. More...
 
void Rast_make_histogram_log_colors (struct Colors *colors, struct Cell_stats *statf, int min, int max)
 Generates histogram with normalized log transformed grey scale. More...
 

Detailed Description

Raster Library - histogram grey scale colors.

(C) 2007-2009 Glynn Clements and the GRASS Development Team

This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Author
Glynn Clements glynn.nosp@m.@gcl.nosp@m.ement.nosp@m.s.pl.nosp@m.us.co.nosp@m.m

Definition in file color_hist.c.

Function Documentation

void Rast_make_histogram_eq_colors ( struct Colors colors,
struct Cell_stats statf 
)

Make histogram-stretched grey colors.

Generates a histogram contrast-stretched grey scale color table that goes from the, histogram information in the Cell_stats structure (see Raster Histograms).

Color range is 0-255.

Parameters
colorspointer to Colors structure which holds color info
statfpointer to Cell_stats structure which holds cell stats info

Definition at line 32 of file color_hist.c.

References cat, count, DEFAULT_BG_COLOR, G_str_to_color(), _Color_Rule_::prev, Rast_add_c_color_rule(), Rast_init_colors(), Rast_next_cell_stat(), Rast_rewind_cell_stats(), Rast_set_null_value_color(), val2, and x.

void Rast_make_histogram_log_colors ( struct Colors colors,
struct Cell_stats statf,
int  min,
int  max 
)

Generates histogram with normalized log transformed grey scale.

Generates histogram with normalized log transformed grey scale from cell stats structure info. Color range is 0-255.

Parameters
colorspointer to Colors structure which holds color info
statfpointer to Cell_stats structure which holds cell stats info
minminimum value
maxmaximum value

Definition at line 101 of file color_hist.c.

References cat, count, DEFAULT_BG_COLOR, G_str_to_color(), int, _Color_Rule_::prev, Rast_add_c_color_rule(), Rast_init_colors(), Rast_next_cell_stat(), Rast_rewind_cell_stats(), Rast_set_null_value_color(), val2, and x.