Isis Developer Reference
|
Store and/or manipulate pixel values. More...
#include <Pixel.h>
Public Member Functions | |
Pixel () | |
Constructs an empty Pixel. More... | |
Pixel (int sample, int line, int band, double DN) | |
Constructs a Pixel given a line, sample, band, and DN. More... | |
Pixel (const Pixel &pixel) | |
Constructs a Pixel, given a Pixel. More... | |
virtual | ~Pixel () |
Default destructor. More... | |
Pixel & | operator= (const Pixel &other) |
Copy assignment operator. More... | |
int | line () const |
int | sample () const |
int | band () const |
double | DN () const |
unsigned char | To8Bit () |
Converts internal pixel value to an unsigned char pixel with special pixel translations. More... | |
short int | To16Bit () |
Converts internal pixel value to a short int pixel with special pixel translations. More... | |
short unsigned int | To16Ubit () |
Converts internal pixel value to a short int pixel with special pixel translations. More... | |
float | To32Bit () |
Converts internal pixel value to float with special pixel translations. More... | |
double | ToDouble () |
Converts stored pixel value to a double. More... | |
float | ToFloat () |
Converts internal pixel value to float with pixel translations and care for overflows (underflows are assumed to cast to 0!) More... | |
std::string | ToString () |
Returns the name of the pixel type as a string. More... | |
bool | IsSpecial () |
Returns true if the input pixel is special. More... | |
bool | IsValid () |
Returns true if the input pixel is valid. More... | |
bool | IsNull () |
Returns true if the input pixel is null. More... | |
bool | IsHigh () |
Returns true if the input pixel is one of the high saturation types. More... | |
bool | IsLow () |
Returns true if the input pixel is one of the low saturation types. More... | |
bool | IsHrs () |
Returns true if the input pixel is high representation saturation. More... | |
bool | IsHis () |
Returns true if the input pixel is high instrument saturation. More... | |
bool | IsLis () |
Returns true if the input pixel is low instrument saturation. More... | |
bool | IsLrs () |
Returns true if the input pixel is low representation saturation. More... | |
Static Public Member Functions | |
static unsigned char | To8Bit (const double d) |
Converts double pixels to unsigned char pixels with special pixel translations. More... | |
static short int | To16Bit (const double d) |
Converts double pixels to short int pixels with special pixel translations. More... | |
static short unsigned int | To16UBit (const double d) |
Converts double pixels to short unsigned int pixels with special pixel translations. More... | |
static float | To32Bit (const double d) |
Converts double pixels to float pixels with special pixel translations. More... | |
static double | ToDouble (const unsigned char t) |
Converts unsigned char pixels to double pixels with special pixel translations. More... | |
static double | ToDouble (const short int t) |
Converts short int pixels to double pixels with special pixel translations. More... | |
static double | ToDouble (const short unsigned int t) |
Converts short unsigned int pixels to double pixels with special pixel translations. More... | |
static double | ToDouble (const float t) |
Converts float pixels to double pixels with special pixel translations. More... | |
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!) More... | |
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!) More... | |
static float | ToFloat (const short unsigned int d) |
Converts short unsigned int to float with pixel translations and care for overflows (underflows are assumed to cast to 0!) More... | |
static float | ToFloat (const double d) |
Converts double to float with pixel translations and care for overflows (underflows are assumed to cast to 0!) More... | |
static std::string | ToString (double d) |
Takes a double pixel value and returns the name of the pixel type as a string. More... | |
static bool | IsSpecial (const double d) |
Returns true if the input pixel is special. More... | |
static bool | IsSpecial (const float f) |
Returns true if the input pixel is special. More... | |
static bool | IsValid (const double d) |
Returns true if the input pixel is valid. More... | |
static bool | IsNull (const double d) |
Returns true if the input pixel is null. More... | |
static bool | IsHigh (const double d) |
Returns true if the input pixel is one of the high saturation types. More... | |
static bool | IsLow (const double d) |
Returns true if the input pixel is one of the low saturation types. More... | |
static bool | IsHrs (const double d) |
Returns true if the input pixel is high representation saturation. More... | |
static bool | IsHis (const double d) |
Returns true if the input pixel is high instrument saturation. More... | |
static bool | IsLis (const double d) |
Returns true if the input pixel is low instrument saturation. More... | |
static bool | IsLrs (const double d) |
Returns true if the input pixel is low representation saturation. More... | |
Store and/or manipulate pixel values.
This class can store pixel information and also contains utility methods for testing and modifying pixel and special pixel values that can be used without instanteating the class.
Isis::Pixel::Pixel | ( | ) |
Constructs an empty Pixel.
References Isis::Null.
Isis::Pixel::Pixel | ( | int | sample, |
int | line, | ||
int | band, | ||
double | DN | ||
) |
Constructs a Pixel given a line, sample, band, and DN.
line | line coordinate |
sample | sample coordinate |
band | band coordinate |
DN | data value for the pixel |
Isis::Pixel::Pixel | ( | const Pixel & | pixel | ) |
|
virtual |
Default destructor.
int Isis::Pixel::band | ( | ) | const |
Referenced by operator=(), and Pixel().
double Isis::Pixel::DN | ( | ) | const |
Referenced by operator=(), and Pixel().
|
inline |
Returns true if the input pixel is one of the high saturation types.
|
inlinestatic |
Returns true if the input pixel is one of the high saturation types.
d | Pixel value to test |
References Isis::HIGH_INSTR_SAT8, and Isis::HIGH_REPR_SAT8.
|
inline |
Returns true if the input pixel is high instrument saturation.
|
inlinestatic |
Returns true if the input pixel is high instrument saturation.
d | Pixel value to test |
References Isis::HIGH_INSTR_SAT8.
|
inline |
Returns true if the input pixel is high representation saturation.
|
inlinestatic |
Returns true if the input pixel is high representation saturation.
d | Pixel value to test |
References Isis::HIGH_REPR_SAT8.
|
inline |
Returns true if the input pixel is low instrument saturation.
|
inlinestatic |
Returns true if the input pixel is low instrument saturation.
d | Pixel value to test |
References Isis::LOW_INSTR_SAT8.
|
inline |
Returns true if the input pixel is one of the low saturation types.
|
inlinestatic |
Returns true if the input pixel is one of the low saturation types.
d | Pixel value to test |
References Isis::LOW_INSTR_SAT8, and Isis::LOW_REPR_SAT8.
|
inline |
Returns true if the input pixel is low representation saturation.
|
inlinestatic |
Returns true if the input pixel is low representation saturation.
d | Pixel value to test |
References Isis::LOW_REPR_SAT8.
|
inline |
Returns true if the input pixel is null.
|
inlinestatic |
Returns true if the input pixel is null.
d | Pixel value to test |
References Isis::NULL8.
|
inline |
Returns true if the input pixel is special.
Not special implies it is valid to use in computations.
|
inlinestatic |
Returns true if the input pixel is special.
Not special implies it is valid to use in computations.
d | Pixel value to test |
References Isis::VALID_MIN8.
|
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.
f | Pixel value to test |
References Isis::VALID_MIN4.
|
inline |
Returns true if the input pixel is valid.
Valid implies the pixel is neither hrs, lrs, his, lis, nor null.
|
inlinestatic |
Returns true if the input pixel is valid.
Valid implies the pixel is neither hrs, lrs, his, lis, nor null.
d | Pixel value to test |
References Isis::VALID_MIN8.
int Isis::Pixel::line | ( | ) | const |
Referenced by operator=(), and Pixel().
int Isis::Pixel::sample | ( | ) | const |
Referenced by Isis::SpectralDefinition2D::findSpectel(), operator=(), and Pixel().
short int Isis::Pixel::To16Bit | ( | ) |
Converts internal pixel value to a short int pixel with special pixel translations.
|
static |
Converts double pixels to short int pixels with special pixel translations.
d | Double pixel value to be converted to a double |
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.
short unsigned int Isis::Pixel::To16Ubit | ( | ) |
Converts internal pixel value to a short int pixel with special pixel translations.
|
static |
Converts double pixels to short unsigned int pixels with special pixel translations.
d | Double pixel value to be converted to a double |
References Isis::HIGH_INSTR_SAT8, Isis::HIGH_INSTR_SATU2, Isis::HIGH_REPR_SAT8, Isis::HIGH_REPR_SATU2, Isis::LOW_INSTR_SAT8, Isis::LOW_INSTR_SATU2, Isis::LOW_REPR_SAT8, Isis::LOW_REPR_SATU2, Isis::NULL8, Isis::NULLU2, Isis::VALID_MAX2, Isis::VALID_MIN2, and Isis::VALID_MIN8.
float Isis::Pixel::To32Bit | ( | ) |
Converts internal pixel value to float with special pixel translations.
|
static |
Converts double pixels to float pixels with special pixel translations.
d | Double pixel value to be converted to a double |
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 | ( | ) |
Converts internal pixel value to an unsigned char pixel with special pixel translations.
|
static |
Converts double pixels to unsigned char pixels with special pixel translations.
d | Double pixel value to be converted to a double |
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 | ( | ) |
Converts stored pixel value to a double.
|
static |
Converts float pixels to double pixels with special pixel translations.
d | Float pixel value to be converted to a double |
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.
|
static |
Converts short int pixels to double pixels with special pixel translations.
d | Short int pixel value to be converted to a double |
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.
|
static |
Converts short unsigned int pixels to double pixels with special pixel translations.
d | Short unsigned int pixel value to be converted to a double |
References Isis::HIGH_INSTR_SAT8, Isis::HIGH_INSTR_SATU2, Isis::HIGH_REPR_SAT8, Isis::HIGH_REPR_SATU2, Isis::LOW_INSTR_SAT8, Isis::LOW_INSTR_SATU2, Isis::LOW_REPR_SAT8, Isis::LOW_REPR_SATU2, Isis::NULL8, Isis::NULLU2, and Isis::VALID_MINU2.
|
static |
Converts unsigned char pixels to double pixels with special pixel translations.
d | Unsigned char pixel value to be converted to a double |
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 | ( | ) |
Converts internal pixel value to float with pixel translations and care for overflows (underflows are assumed to cast to 0!)
|
static |
Converts double to float with pixel translations and care for overflows (underflows are assumed to cast to 0!)
t | Double pixel value to be converted to a float |
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.
|
static |
Converts short int to float with pixel translations and care for overflows (underflows are assumed to cast to 0!)
t | Short int pixel value to be converted to a float |
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.
|
static |
Converts short unsigned int to float with pixel translations and care for overflows (underflows are assumed to cast to 0!)
t | Short unsigned int pixel value to be converted to a float |
References Isis::HIGH_INSTR_SAT4, Isis::HIGH_INSTR_SATU2, Isis::HIGH_REPR_SAT4, Isis::HIGH_REPR_SAT8, Isis::HIGH_REPR_SATU2, Isis::LOW_INSTR_SAT4, Isis::LOW_INSTR_SATU2, Isis::LOW_REPR_SAT4, Isis::LOW_REPR_SATU2, Isis::NULL4, Isis::NULLU2, Isis::VALID_MAXU2, and Isis::VALID_MINU2.
|
static |
Converts unsigned char to float with pixel translations and care for overflows (underflows are assumed to cast to 0!)
t | Unsigned char pixel value to be converted to a float |
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 | ( | ) |
Returns the name of the pixel type as a string.
References Isis::ToString().
|
static |
Takes a double pixel value and returns the name of the pixel type as a string.
d | Pixel value |
References Isis::IsSpecial().