GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
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

◆ Rast_make_histogram_eq_colors()

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.

◆ Rast_make_histogram_log_colors()

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.