USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::Pixel Class Reference
[Utility]

Manipulate pixel values. More...

#include <Pixel.h>

List of all members.

Static Public Member Functions

static unsigned char To8Bit (const double d)
 Converts double pixels to unsigned char pixels with special pixel translations.
static short int To16Bit (const double d)
 Converts double pixels to short int pixels with special pixel translations.
static float To32Bit (const double d)
 Converts double pixels to float pixels with special pixel translations.
static double ToDouble (const unsigned char t)
 Converts unsigned char pixels to double pixels with special pixel translations.
static double ToDouble (const short int t)
 Converts short int pixels to double pixels with special pixel translations.
static double ToDouble (const float t)
 Converts float pixels to double pixels with special pixel translations.
static float ToFloat (const unsigned char d)
 Converts unsigned char to float with pixel translations and care for overflows (underflows are assumed to cast to 0!).
static float ToFloat (const short int d)
 Converts short int to float with pixel translations and care for overflows (underflows are assumed to cast to 0!).
static float ToFloat (const double d)
 Converts double to float with pixel translations and care for overflows (underflows are assumed to cast to 0!).
static std::string ToString (double d)
 Takes a double pixel value and returns the name of the pixel type as a string.
static bool IsSpecial (const double d)
 Returns true if the input pixel is special.
static bool IsSpecial (const float f)
 Returns true if the input pixel is special.
static bool IsValid (const double d)
 Returns true if the input pixel is valid.
static bool IsNull (const double d)
 Returns true if the input pixel is null.
static bool IsHigh (const double d)
 Returns true if the input pixel is one of the high saturation types.
static bool IsLow (const double d)
 Returns true if the input pixel is one of the low saturation types.
static bool IsHrs (const double d)
 Returns true if the input pixel is high representation saturation.
static bool IsHis (const double d)
 Returns true if the input pixel is high instrument saturation.
static bool IsLis (const double d)
 Returns true if the input pixel is low instrument saturation.
static bool IsLrs (const double d)
 Returns true if the input pixel is low representation saturation.

Detailed Description

Manipulate pixel values.

This class contains utility methods for testing and modifying pixel and special pixel values.

Author:
2002-04-11 Kris Becker

Member Function Documentation

static bool Isis::Pixel::IsHigh ( const double  d  )  [inline, static]

Returns true if the input pixel is one of the high saturation types.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::HIGH_INSTR_SAT8, and Isis::HIGH_REPR_SAT8.

static bool Isis::Pixel::IsHis ( const double  d  )  [inline, static]

Returns true if the input pixel is high instrument saturation.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::HIGH_INSTR_SAT8.

Referenced by ToString().

static bool Isis::Pixel::IsHrs ( const double  d  )  [inline, static]

Returns true if the input pixel is high representation saturation.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::HIGH_REPR_SAT8.

Referenced by ToString().

static bool Isis::Pixel::IsLis ( const double  d  )  [inline, static]

Returns true if the input pixel is low instrument saturation.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::LOW_INSTR_SAT8.

Referenced by ToString().

static bool Isis::Pixel::IsLow ( const double  d  )  [inline, static]

Returns true if the input pixel is one of the low saturation types.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::LOW_INSTR_SAT8, and Isis::LOW_REPR_SAT8.

static bool Isis::Pixel::IsLrs ( const double  d  )  [inline, static]

Returns true if the input pixel is low representation saturation.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::LOW_REPR_SAT8.

Referenced by ToString().

static bool Isis::Pixel::IsNull ( const double  d  )  [inline, static]

Returns true if the input pixel is null.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::NULL8.

Referenced by ToString().

static bool Isis::Pixel::IsSpecial ( const float  f  )  [inline, static]

Returns true if the input pixel is special.

Not special implies it is valid to use in computations. This method applies to a 4-byte floating point rather than an 8-byte double.

Parameters:
f Pixel value to test
Returns:
bool

References Isis::VALID_MIN4.

static bool Isis::Pixel::IsSpecial ( const double  d  )  [inline, static]

Returns true if the input pixel is special.

Not special implies it is valid to use in computations.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::VALID_MIN8.

Referenced by ToString().

static bool Isis::Pixel::IsValid ( const double  d  )  [inline, static]

Returns true if the input pixel is valid.

Valid implies the pixel is neither hrs, lrs, his, lis, nor null.

Parameters:
d Pixel value to test
Returns:
bool

References Isis::VALID_MIN8.

short int Isis::Pixel::To16Bit ( const double  d  )  [static]

Converts double pixels to short int pixels with special pixel translations.

Parameters:
d Double pixel value to be converted to a double
Returns:
short int The short int pixel value

References Isis::HIGH_INSTR_SAT2, Isis::HIGH_INSTR_SAT8, Isis::HIGH_REPR_SAT2, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT2, Isis::LOW_INSTR_SAT8, Isis::LOW_REPR_SAT2, Isis::LOW_REPR_SAT8, Isis::NULL2, Isis::NULL8, Isis::VALID_MAX2, Isis::VALID_MIN2, and Isis::VALID_MIN8.

float Isis::Pixel::To32Bit ( const double  d  )  [static]

Converts double pixels to float pixels with special pixel translations.

Parameters:
d Double pixel value to be converted to a double
Returns:
float The float pixel value

References Isis::HIGH_INSTR_SAT4, Isis::HIGH_INSTR_SAT8, Isis::HIGH_REPR_SAT4, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT4, Isis::LOW_INSTR_SAT8, Isis::LOW_REPR_SAT4, Isis::LOW_REPR_SAT8, Isis::NULL4, Isis::NULL8, Isis::VALID_MAX8, and Isis::VALID_MIN8.

unsigned char Isis::Pixel::To8Bit ( const double  d  )  [static]

Converts double pixels to unsigned char pixels with special pixel translations.

Parameters:
d Double pixel value to be converted to a double
Returns:
unsigned char The unsigned char pixel value

References Isis::HIGH_INSTR_SAT1, Isis::HIGH_INSTR_SAT8, Isis::HIGH_REPR_SAT1, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT1, Isis::LOW_INSTR_SAT8, Isis::LOW_REPR_SAT1, Isis::LOW_REPR_SAT8, Isis::NULL1, Isis::NULL8, Isis::VALID_MAX1, Isis::VALID_MIN1, and Isis::VALID_MIN8.

double Isis::Pixel::ToDouble ( const float  d  )  [static]

Converts float pixels to double pixels with special pixel translations.

Parameters:
d Float pixel value to be converted to a double
Returns:
double The double pixel value

References Isis::HIGH_INSTR_SAT4, Isis::HIGH_INSTR_SAT8, Isis::HIGH_REPR_SAT4, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT4, Isis::LOW_INSTR_SAT8, Isis::LOW_REPR_SAT4, Isis::LOW_REPR_SAT8, Isis::NULL4, Isis::NULL8, Isis::VALID_MAX4, and Isis::VALID_MIN4.

double Isis::Pixel::ToDouble ( const short int  d  )  [static]

Converts short int pixels to double pixels with special pixel translations.

Parameters:
d Short int pixel value to be converted to a double
Returns:
double The double pixel value

References Isis::HIGH_INSTR_SAT2, Isis::HIGH_INSTR_SAT8, Isis::HIGH_REPR_SAT2, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT2, Isis::LOW_INSTR_SAT8, Isis::LOW_REPR_SAT2, Isis::LOW_REPR_SAT8, Isis::NULL2, Isis::NULL8, and Isis::VALID_MIN2.

double Isis::Pixel::ToDouble ( const unsigned char  d  )  [static]

Converts unsigned char pixels to double pixels with special pixel translations.

Parameters:
d Unsigned char pixel value to be converted to a double
Returns:
double The double pixel value

References Isis::HIGH_INSTR_SAT1, Isis::HIGH_INSTR_SAT8, Isis::HIGH_REPR_SAT1, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT1, Isis::LOW_INSTR_SAT8, Isis::LOW_REPR_SAT1, Isis::LOW_REPR_SAT8, Isis::NULL1, Isis::NULL8, Isis::VALID_MAX1, and Isis::VALID_MIN1.

float Isis::Pixel::ToFloat ( const double  t  )  [static]

Converts double to float with pixel translations and care for overflows (underflows are assumed to cast to 0!).

Parameters:
t Double pixel value to be converted to a float
Returns:
float The float pixel value

References Isis::HIGH_INSTR_SAT4, Isis::HIGH_INSTR_SAT8, Isis::HIGH_REPR_SAT4, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT4, Isis::LOW_INSTR_SAT8, Isis::LOW_REPR_SAT4, Isis::LOW_REPR_SAT8, Isis::NULL4, Isis::NULL8, Isis::VALID_MAX8, and Isis::VALID_MIN8.

float Isis::Pixel::ToFloat ( const short int  t  )  [static]

Converts short int to float with pixel translations and care for overflows (underflows are assumed to cast to 0!).

Parameters:
t Short int pixel value to be converted to a float
Returns:
float The float pixel value

References Isis::HIGH_INSTR_SAT2, Isis::HIGH_INSTR_SAT4, Isis::HIGH_REPR_SAT2, Isis::HIGH_REPR_SAT4, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT2, Isis::LOW_INSTR_SAT4, Isis::LOW_REPR_SAT2, Isis::LOW_REPR_SAT4, Isis::NULL2, Isis::NULL4, Isis::VALID_MAX2, and Isis::VALID_MIN2.

float Isis::Pixel::ToFloat ( const unsigned char  t  )  [static]

Converts unsigned char to float with pixel translations and care for overflows (underflows are assumed to cast to 0!).

Parameters:
t Unsigned char pixel value to be converted to a float
Returns:
float The float pixel value

References Isis::HIGH_INSTR_SAT1, Isis::HIGH_INSTR_SAT4, Isis::HIGH_REPR_SAT1, Isis::HIGH_REPR_SAT4, Isis::HIGH_REPR_SAT8, Isis::LOW_INSTR_SAT1, Isis::LOW_INSTR_SAT4, Isis::LOW_REPR_SAT1, Isis::LOW_REPR_SAT4, Isis::NULL1, Isis::NULL4, Isis::VALID_MAX1, and Isis::VALID_MIN1.

string Isis::Pixel::ToString ( double  d  )  [static]

Takes a double pixel value and returns the name of the pixel type as a string.

Parameters:
d Pixel value
Returns:
string The name of the pixel type

References IsHis(), IsHrs(), IsLis(), IsLrs(), IsNull(), and IsSpecial().


The documentation for this class was generated from the following files: