The "cf" Package
These routines are meant to provide a VERY primitive mechanism to generate
simple colourmaps. Although these routines are made public, their use is
NOT recommended. The kcmap_ package is the suggested means to create
and manipulate colourmaps.
Library: karma
Link With: -lkarma
Functions
Functions
void
cf_mandelbrot (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a mandelbrot colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_greyscale1 (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a greyscale colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The array of red intensity values. This may be NULL.
- greens :
The array of green intensity values. This may be NULL.
- blues :
The array of blue intensity values. This may be NULL.
- stride :
The stride (in unsigned shorts) between intensity values in the
array.
- x :
A parameter used to compute the colour values.
- y :
A parameter used to compute the colour values.
- max_cells :
A parameter used to compute the colour values.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_greyscale2 (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a greyscale colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The array of red intensity values. This may be NULL.
- greens :
The array of green intensity values. This may be NULL.
- blues :
The array of blue intensity values. This may be NULL.
- stride :
The stride (in unsigned shorts) between intensity values in the
array.
- x :
A parameter used to compute the colour values.
- y :
A parameter used to compute the colour values.
- max_cells :
A parameter used to compute the colour values.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_greyscale3 (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
This routine will compute a greyscale colourmap using the Glynn
Rogers curvature function.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values. This may be NULL.
- greens :
The green intensity values. This may be NULL.
- blues :
The blue intensity values. This may be NULL.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_rainbow1 (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
This routine will compute a colourmap using the Glynn Rogers
curvature function. This map goes: blue-cyan-green-yellow-red-magenta.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_rainbow2 (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
This routine will compute a colourmap using the Glynn Rogers
curvature function. This map goes: black-blue-cyan-green-yellow-red.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_rainbow3 (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
This routine will compute a colourmap using the Glynn Rogers
curvature function. This map goes: black-blue-cyan-green-yellow-white.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_cyclic1 (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
This routine will compute a colourmap using the Glynn Rogers
curvature function. This map goes: blue-cyan-green-yellow-white.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_stripchart (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *chart)
This routine will compute a colourmap using the Glynn Rogers
curvature function and a strip chart.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values. This may be NULL.
- greens :
The green intensity values. This may be NULL.
- blues :
The blue intensity values. This may be NULL.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
This changes the curvature of the ramping function.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
This changes the curvature of the ramping function.
- chart :
A pointer to a stripchart of type stripchart.
The following values are used to determine the shape of the graph:
0 : graph is at zero for this interval
99 : graph is at maximum
1 : graph ramps up from zero to max using Glynn Rogers function
-1 : graph ramps down from max to zero using Glynn Rogers function
2 (-2) : graph ramps up (down) using the sine of Glynn Rogers function
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_random_grey (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a random grey colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values. This may be NULL.
- greens :
The green intensity values. This may be NULL.
- blues :
The blue intensity values. This may be NULL.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_random_pseudocolour (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y,
void *var_param)
Compute a random pseudocolour colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_velocity_compensating_tones (unsigned int num_cells,
unsigned short *reds,
unsigned short *greens,
unsigned short *blues,
unsigned int stride, double x, double y,
void *var_param)
Compute a Velocity (compensating tones) colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_compressed_colourmap_3r2g2b (unsigned int num_cells,
unsigned short *reds,
unsigned short *greens,
unsigned short *blues,
unsigned int stride, double x, double y,
void *var_param)
Compute a compressed colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_ronekers (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a Ron Ekers colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_background (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a background colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_heat (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a heat colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_isophot (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute an isophot colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_mono (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a greyscale colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values. This may be NULL.
- greens :
The green intensity values. This may be NULL.
- blues :
The blue intensity values. This may be NULL.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_mousse (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a mousse colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_rainbow (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a rainbow colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_random (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a rainbow colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_rgb (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute an rainbow colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_smooth (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a rainbow colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_staircase (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a staircase colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
void
cf_mirp (unsigned int num_cells, unsigned short *reds,
unsigned short *greens, unsigned short *blues,
unsigned int stride, double x, double y, void *var_param)
Compute a MIRP colourmap.
Parameters:
- num_cells :
The number of colour cells to modify.
- reds :
The red intensity values.
- greens :
The green intensity values.
- blues :
The blue intensity values.
- stride :
The stride (in unsigned shorts) between intensity values.
- x :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- y :
A parameter used to compute the colour values, ranging from 0.0 to 1.0.
- var_param :
A parameter used to compute the colour values. Ignored.
Returns: Nothing.
Multithreading Level: Unsafe
Contact: Richard Gooch
Web Development: Ariel Internet Services