USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::Pixel Class Reference

Manipulate pixel values. More...

#include <Pixel.h>

Collaboration diagram for Isis::Pixel:
Collaboration graph

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
History:

2003-02-11 Jeff Anderson - Wrote unitTest and documentation

2003-05-16 Stuart Sides - Modified schema from astrogeology... isis.astrogeology...

2005-02-15 Elizabeth Ribelin - Modified file to support Doxygen documentation

2005-05-18 Jeff Anderson - Changed long to int for 64-bit port

2006-06-21 Elizabeth Miller - Copied SpecialPixel methods into into the Pixel class for easy refactoring later and added several conversion methods

2009-02-03 Travis Addair - Modified documentation for clarity

Definition at line 51 of file Pixel.h.

Member Function Documentation

static bool Isis::Pixel::IsHigh ( const double  d)
inlinestatic

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

Parameters
dPixel value to test
Returns
bool

Definition at line 122 of file Pixel.h.

static bool Isis::Pixel::IsHis ( const double  d)
inlinestatic

Returns true if the input pixel is high instrument saturation.

Parameters
dPixel value to test
Returns
bool

Definition at line 155 of file Pixel.h.

static bool Isis::Pixel::IsHrs ( const double  d)
inlinestatic

Returns true if the input pixel is high representation saturation.

Parameters
dPixel value to test
Returns
bool

Definition at line 144 of file Pixel.h.

static bool Isis::Pixel::IsLis ( const double  d)
inlinestatic

Returns true if the input pixel is low instrument saturation.

Parameters
dPixel value to test
Returns
bool

Definition at line 166 of file Pixel.h.

static bool Isis::Pixel::IsLow ( const double  d)
inlinestatic

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

Parameters
dPixel value to test
Returns
bool

Definition at line 133 of file Pixel.h.

static bool Isis::Pixel::IsLrs ( const double  d)
inlinestatic

Returns true if the input pixel is low representation saturation.

Parameters
dPixel value to test
Returns
bool

Definition at line 177 of file Pixel.h.

static bool Isis::Pixel::IsNull ( const double  d)
inlinestatic

Returns true if the input pixel is null.

Parameters
dPixel value to test
Returns
bool

Definition at line 111 of file Pixel.h.

static bool Isis::Pixel::IsSpecial ( const double  d)
inlinestatic

Returns true if the input pixel is special.

Not special implies it is valid to use in computations.

Parameters
dPixel value to test
Returns
bool

Definition at line 75 of file Pixel.h.

static bool Isis::Pixel::IsSpecial ( const float  f)
inlinestatic

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
fPixel value to test
Returns
bool

Definition at line 88 of file Pixel.h.

static bool Isis::Pixel::IsValid ( const double  d)
inlinestatic

Returns true if the input pixel is valid.

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

Parameters
dPixel value to test
Returns
bool

Definition at line 100 of file Pixel.h.

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

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

Parameters
dDouble pixel value to be converted to a double
Returns
short int The short int pixel value

Definition at line 65 of file Pixel.cpp.

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

Converts double pixels to float pixels with special pixel translations.

Parameters
dDouble pixel value to be converted to a double
Returns
float The float pixel value

Definition at line 102 of file Pixel.cpp.

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

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

Parameters
dDouble pixel value to be converted to a double
Returns
unsigned char The unsigned char pixel value

Definition at line 36 of file Pixel.cpp.

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

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

Parameters
dUnsigned char pixel value to be converted to a double
Returns
double The double pixel value

Definition at line 123 of file Pixel.cpp.

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

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

Parameters
dShort int pixel value to be converted to a double
Returns
double The double pixel value

Definition at line 143 of file Pixel.cpp.

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

Converts float pixels to double pixels with special pixel translations.

Parameters
dFloat pixel value to be converted to a double
Returns
double The double pixel value

Definition at line 162 of file Pixel.cpp.

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
tUnsigned char pixel value to be converted to a float
Returns
float The float pixel value

Definition at line 185 of file Pixel.cpp.

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
tShort int pixel value to be converted to a float
Returns
float The float pixel value

Definition at line 206 of file Pixel.cpp.

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
tDouble pixel value to be converted to a float
Returns
float The float pixel value

Definition at line 227 of file Pixel.cpp.

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

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

Parameters
dPixel value
Returns
string The name of the pixel type

Definition at line 248 of file Pixel.cpp.

References Isis::IsSpecial().


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