GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
color_xform.c File Reference

Raster Library - Colors management. More...

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

Go to the source code of this file.

Functions

void Rast_histogram_eq_colors (struct Colors *dst, struct Colors *src, struct Cell_stats *statf)
 Make histogram-stretched version of existing color table. More...
 
void Rast_histogram_eq_fp_colors (struct Colors *dst, struct Colors *src, struct FP_stats *statf)
 Make histogram-stretched version of existing color table (FP version) More...
 
void Rast_log_colors (struct Colors *dst, struct Colors *src, int samples)
 Make logarithmically-scaled version of an existing color table. More...
 
void Rast_abs_log_colors (struct Colors *dst, struct Colors *src, int samples)
 Make logarithmically-scaled version of an existing color table, allowing for signed values. More...
 

Detailed Description

Raster Library - Colors management.

(C) 2001-2009 by 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
Original author CERL

Definition in file color_xform.c.

Function Documentation

◆ Rast_abs_log_colors()

void Rast_abs_log_colors ( struct Colors dst,
struct Colors src,
int  samples 
)

Make logarithmically-scaled version of an existing color table, allowing for signed values.

Parameters
[out]dststruct to hold new colors
srcstruct containing original colors
samplesnumber of samples

Definition at line 243 of file color_xform.c.

◆ Rast_histogram_eq_colors()

void Rast_histogram_eq_colors ( struct Colors dst,
struct Colors src,
struct Cell_stats statf 
)

Make histogram-stretched version of existing color table.

Generates a histogram contrast-stretched color table that goes from the histogram information in the Cell_stats structure statf. (See Raster Histograms).

Parameters
[out]dststruct to hold new colors
srcstruct containing original colors
statfcell stats info

Definition at line 30 of file color_xform.c.

◆ Rast_histogram_eq_fp_colors()

void Rast_histogram_eq_fp_colors ( struct Colors dst,
struct Colors src,
struct FP_stats statf 
)

Make histogram-stretched version of existing color table (FP version)

Generates a histogram contrast-stretched color table that goes from the histogram information in the FP_stats structure statf. (See Raster Histograms).

Parameters
[out]dststruct to hold new colors
srcstruct containing original colors
statfcell stats info

Definition at line 109 of file color_xform.c.

◆ Rast_log_colors()

void Rast_log_colors ( struct Colors dst,
struct Colors src,
int  samples 
)

Make logarithmically-scaled version of an existing color table.

Parameters
[out]dststruct to hold new colors
srcstruct containing original colors
samplesnumber of samples

Definition at line 185 of file color_xform.c.