mi32/colorspc.h File Reference

<mi32/colorspc.h> More...

#include <mi32/stddefns.h>
Include dependency graph for colorspc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  COLORHIS
 Structure for Hue-Intensity/Brightness-Saturation color model. More...
struct  COLORHSV
 Structure for Hue-Saturation-Value (USGS Munsell color model). More...

Enumerations

enum  COLORSPACE {
  COLORSPACE_Unknown = 0, COLORSPACE_Gray8 = 3, COLORSPACE_Gray16 = 4, COLORSPACE_Gray32 = 5,
  COLORSPACE_Indexed8 = 6, COLORSPACE_Indexed16 = 7, COLORSPACE_R8_G8_B8 = 8, COLORSPACE_B8_G8_R8 = 9,
  COLORSPACE_R8_G8_B8_X8 = 16, COLORSPACE_X8_R8_G8_B8 = 17, COLORSPACE_B8_G8_R8_X8 = 18, COLORSPACE_X8_B8_G8_R8 = 19,
  COLORSPACE_R8_G8_B8_A8 = 20, COLORSPACE_A8_R8_G8_B8 = 21, COLORSPACE_B8_G8_R8_A8 = 22, COLORSPACE_A8_B8_G8_R8 = 23,
  COLORSPACE_C8_M8_Y8 = 31, COLORSPACE_C8_M8_Y8_X8 = 32, COLORSPACE_C8_M8_Y8_K8 = 33, COLORSPACE_X8_C8_M8_Y8 = 34,
  COLORSPACE_K8_C8_M8_Y8 = 35, COLORSPACE_Indexed4 = 36, COLORSPACE_Packed8_Binary_LowFirst = 101, COLORSPACE_Packed8_Binary_HighFirst = 102,
  COLORSPACE_Packed8_Gray4_LowFirst = 103, COLORSPACE_Packed8_Gray4_HighFirst = 104, COLORSPACE_Packed8_Indexed4_LowFirst = 105, COLORSPACE_Packed8_Indexed4_HighFirst = 106,
  COLORSPACE_Packed16_X1_R5_G5_B5 = 201, COLORSPACE_Packed16_X1_B5_G5_R5 = 202, COLORSPACE_R16_G16_B16 = 300, COLORSPACE_X16_Y16_Z16 = 301,
  COLORSPACE_L16_a16_b16 = 302
}

Functions

bool ConvertColorToHBS (const COLOR &color, double &hue, double &brightness, double &saturation)
bool ConvertColorToHIS (const COLOR &color, double &hue, double &intensity, double &saturation)
bool ConvertHBStoColor (double hue, double brightness, double saturation, COLOR &color)
bool ConvertHBStoRGB (double hue, double brightness, double saturation, double MaxRGB, double &red, double &green, double &blue)
bool ConvertHIStoColor (double hue, double intensity, double saturation, COLOR &color)
bool ConvertHIStoRGB (double hue, double intensity, double saturation, double MaxRGB, double &red, double &green, double &blue)
bool ConvertRGBtoHBS (double MaxRGB, double red, double green, double blue, double &hue, double &brightness, double &saturation)
bool ConvertRGBtoHIS (double MaxRGB, double red, double green, double blue, double &hue, double &intensity, double &saturation)
DEPRECATED void HBStoRGB (const COLORHIS *his, COLOR *rgb)
DEPRECATED void HIStoRGB (const COLORHIS *his, COLOR *rgb)
void HSVtoRGB (const COLORHSV *hsv, COLOR *rgb)
DEPRECATED void RGBtoHBS (const COLOR *rgb, COLORHIS *his)
DEPRECATED void RGBtoHIS (const COLOR *rgb, COLORHIS *his)
void RGBtoHSV (const COLOR *rgb, COLORHSV *hsv)

Detailed Description

<mi32/colorspc.h>

Definitions colorspaces


Enumeration Type Documentation

enum COLORSPACE

< GENERATING_DOXYGEN_OUTPUT

Color space enumeration, used to described how image/color data is stored in a memory buffer. Some colorspace values such as those having 'alpha' component may be treated identically to the similar values having a 'skip' component in the same position. In addition, some processes may treat gray and indexed colorspaces identically.

In "unpacked" colorspaces, each component is accessed sequentially in the data using data elements of the size (in bits) specified. For components of more than 8 bits this is assumed to be in the NATIVE byte order of the machine and thus byte swapping may need to be performed when accessing from external sources.

In "packed" colorspaces, more than one pixel or component is 'packed' into a data element. The number after 'Packed' indicates the size of each data element in bits. For elements larger than 8 bits this is assumed to be in the NATIVE byte order of the machine and thus byte swapping may need to be performed when accessing data. When multiple components are packed into a data element they are listed in order from most-significant bits to least.

Enumerator:
COLORSPACE_Unknown 
COLORSPACE_Gray8 

Grayscale 1 byte/pixel.

COLORSPACE_Gray16 

Grayscale 2 bytes/pixel.

COLORSPACE_Gray32 

Grayscale 4 bytes/pixel.

COLORSPACE_Indexed8 

Indexed 1 byte/pixel.

COLORSPACE_Indexed16 

Indexed 2 bytes/pixel.

COLORSPACE_R8_G8_B8 

Red, Green, Blue, 1 byte each.

COLORSPACE_B8_G8_R8 

Blue, Green, Red, 1 byte each.

COLORSPACE_R8_G8_B8_X8 

Red, Green, Blue, Skip, 1 byte each.

COLORSPACE_X8_R8_G8_B8 

Skip, Red, Green, Blue, 1 byte each.

COLORSPACE_B8_G8_R8_X8 

Blue, Green, Red, Skip, 1 byte each.

COLORSPACE_X8_B8_G8_R8 

Skip, Blue, Green, Red, 1 byte each.

COLORSPACE_R8_G8_B8_A8 

Red, Green, Blue, Alpha, 1 byte each.

COLORSPACE_A8_R8_G8_B8 

Alpha, Red, Green, Blue, 1 byte each.

COLORSPACE_B8_G8_R8_A8 

Blue, Green, Red, Alpha, 1 byte each.

COLORSPACE_A8_B8_G8_R8 

Alpha, Blue, Green, Red, 1 byte each.

COLORSPACE_C8_M8_Y8 

Cyan, Magenta, Yellow, 1 byte each.

COLORSPACE_C8_M8_Y8_X8 

Cyan, Magenta, Yellow, Skip, 1 byte each.

COLORSPACE_C8_M8_Y8_K8 

Cyan, Magenta, Yellow, Black, 1 byte each.

COLORSPACE_X8_C8_M8_Y8 

Skip, Cyan, Magenta, Yellow, 1 byte each.

COLORSPACE_K8_C8_M8_Y8 

Black, Cyan, Magenta, Yellow, 1 byte each.

COLORSPACE_Indexed4 

4-bits per pixel colormapped

COLORSPACE_Packed8_Binary_LowFirst 

1 bit/pixel, low bit first along image line

COLORSPACE_Packed8_Binary_HighFirst 

1 bit/pixel, high bit first along image line

COLORSPACE_Packed8_Gray4_LowFirst 

4 bits/pixel, low nibble first along image line

COLORSPACE_Packed8_Gray4_HighFirst 

4 bits/pixel, high nibble first along image line

COLORSPACE_Packed8_Indexed4_LowFirst 

Indexed 4 bits/pixel, low nibble first along image line.

COLORSPACE_Packed8_Indexed4_HighFirst 

Indexed 4 bits/pixel, high nibble first along image line.

COLORSPACE_Packed16_X1_R5_G5_B5 

0RRRRRGGGGGBBBBB

COLORSPACE_Packed16_X1_B5_G5_R5 

0BBBBBGGGGGRRRRR

COLORSPACE_R16_G16_B16 

sRGB as 16-bit per sample

COLORSPACE_X16_Y16_Z16 

CIE XYZ as 16-bit per sample fixed point.

COLORSPACE_L16_a16_b16 

CIE Lab as 16-bit per sample fixed point.


Function Documentation

bool ConvertColorToHBS ( const COLOR color,
double &  hue,
double &  brightness,
double &  saturation 
)

Convert COLOR to Hue-Brightness-Saturation.

Returns:
true if values are valid, false if not
Parameters:
color Color to convert
hue Hue 0-360 returned
brightness Brightness 0-100 returned
saturation Saturation 0=100 returned
bool ConvertColorToHIS ( const COLOR color,
double &  hue,
double &  intensity,
double &  saturation 
)

Convert COLOR to Hue-Intensity-Saturation.

Returns:
true if values are valid, false if not
Parameters:
color Color to convert
hue Hue 0-360 returned
intensity Intensity 0-100 returned
saturation Saturation 0=100 returned
bool ConvertHBStoColor ( double  hue,
double  brightness,
double  saturation,
COLOR color 
)

Function prototypes.

Convert Hue-Brightness-Saturation to COLOR.

Returns:
true if values are valid, false if not
Parameters:
hue Hue 0-360
brightness Brightness 0-100
saturation Saturation 0-100
color Color returned
bool ConvertHBStoRGB ( double  hue,
double  brightness,
double  saturation,
double  MaxRGB,
double &  red,
double &  green,
double &  blue 
)

Convert Hue-Brightness-Saturation to Red-Green-Blue.

Returns:
true if values are valid, false if not
Parameters:
hue Hue 0-360
brightness Brightness 0-100
saturation Saturation 0-100
MaxRGB Range for RGB values
red Red returned
green Green returned
blue Blue returned
bool ConvertHIStoColor ( double  hue,
double  intensity,
double  saturation,
COLOR color 
)

Convert Hue-Intensity-Saturation to COLOR.

Returns:
true if values are valid, false if not
Parameters:
hue Hue 0-360
intensity Intensity 0-100
saturation Saturation 0-100
color Color returned
bool ConvertHIStoRGB ( double  hue,
double  intensity,
double  saturation,
double  MaxRGB,
double &  red,
double &  green,
double &  blue 
)

Convert Hue-Intensity-Saturation to Red-Green-Blue.

Returns:
true if values are valid, false if not
Parameters:
hue Hue 0-360
intensity Intensity 0-100
saturation Saturation 0-100
MaxRGB Range for RGB values
red Red returned
green Green returned
blue Blue returned
bool ConvertRGBtoHBS ( double  MaxRGB,
double  red,
double  green,
double  blue,
double &  hue,
double &  brightness,
double &  saturation 
)

Convert Red-Green-Blue to Hue-Brightness-Saturation.

Returns:
true if values are valid, false if not
Parameters:
MaxRGB Range for RGB values
red Red 0-MaxRGB
green Green 0-MaxRGB
blue Blue 0-MaxRGB
hue Hue 0-360 returned
brightness Brightness 0-100 returned
saturation Saturation 0=100 returned
bool ConvertRGBtoHIS ( double  MaxRGB,
double  red,
double  green,
double  blue,
double &  hue,
double &  intensity,
double &  saturation 
)

Convert Red-Green-Blue to Hue-Intensity-Saturation.

Returns:
true if values are valid, false if not
Parameters:
MaxRGB Range for RGB values
red Red 0-MaxRGB
green Green 0-MaxRGB
blue Blue 0-MaxRGB
hue Hue 0-360 returned
intensity Intensity 0-100 returned
saturation Saturation 0=100 returned
DEPRECATED void HBStoRGB ( const COLORHIS his,
COLOR rgb 
)

Convert Hue-Brightness-Saturation to Red-Green-Blue.

Deprecated:
use ConvertHBStoRGB or ConvertHBStoColor.
DEPRECATED void HIStoRGB ( const COLORHIS his,
COLOR rgb 
)

Convert Hue-Intensity-Saturation to Red-Green-Blue.

Deprecated:
use ConvertHIStoRGB or ConvertHIStoColor.
void HSVtoRGB ( const COLORHSV hsv,
COLOR rgb 
)

Convert Hue-Brightness-Saturation to Red-Green-Blue.

Hue ranges 0-360 Saturation ranges 0-208 Value ranges 0-512 ("approximately") (according to ENVI documenation & munsell.pro IDL code).

DEPRECATED void RGBtoHBS ( const COLOR rgb,
COLORHIS his 
)

Convert Red-Green-Blue to Hue-Brightness-Saturation.

Deprecated:
use ConvertRGBtoHBS or ConvertColorToHBS.
DEPRECATED void RGBtoHIS ( const COLOR rgb,
COLORHIS his 
)

Convert Red-Green-Blue to Hue-Intensity-Saturation.

Deprecated:
use ConvertRGBtoHIS or ConvertColorToHIS.
void RGBtoHSV ( const COLOR rgb,
COLORHSV hsv 
)

Convert Red-Green-Blue to Hue-Saturation-Value.

Hue ranges 0-360 Saturation ranges 0-208 Value ranges 0-512 ("approximately") (according to ENVI documenation & munsell.pro IDL code).


Generated on Sun Oct 7 21:25:49 2012 for TNTsdk 2012 by  doxygen 1.6.1