![]() |
Isis 3 Programmer 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... | |
Private Attributes | |
int | m_line |
line coordinate of pixel More... | |
int | m_sample |
sample coordinate of pixel More... | |
int | m_band |
band coordinate of pixel More... | |
double | m_DN |
DN of pixel. 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.
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
2015-08-05 Kristin Berry - Added empty constructor, copy constructor, copy assignement operator, and virutal destructor. Also updated to comply with Isiscoding standards.
2016-04-20 Makayla Shepherd - Added methods to handle UnsignedWord pixel type.
Isis::Pixel::Pixel | ( | ) |
Isis::Pixel::Pixel | ( | int | sample, |
int | line, | ||
int | band, | ||
double | DN | ||
) |
Isis::Pixel::Pixel | ( | const Pixel & | pixel | ) |
int Isis::Pixel::band | ( | ) | const |
Definition at line 108 of file Pixel.cpp.
Referenced by operator=(), and Pixel().
double Isis::Pixel::DN | ( | ) | const |
Definition at line 114 of file Pixel.cpp.
Referenced by operator=(), and Pixel().
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
int Isis::Pixel::line | ( | ) | const |
Definition at line 96 of file Pixel.cpp.
Referenced by operator=(), and Pixel().
int Isis::Pixel::sample | ( | ) | const |
Definition at line 102 of file Pixel.cpp.
Referenced by operator=(), and Pixel().
|
static |
short int Isis::Pixel::To16Bit | ( | ) |
|
static |
short unsigned int Isis::Pixel::To16Ubit | ( | ) |
|
static |
float Isis::Pixel::To32Bit | ( | ) |
|
static |
unsigned char Isis::Pixel::To8Bit | ( | ) |
|
static |
|
static |
|
static |
|
static |
double Isis::Pixel::ToDouble | ( | ) |
|
static |
|
static |
|
static |
|
static |
float Isis::Pixel::ToFloat | ( | ) |
|
static |
Takes a double pixel value and returns the name of the pixel type as a string.
d | Pixel value |
Definition at line 485 of file Pixel.cpp.
References Isis::IsSpecial().
string Isis::Pixel::ToString | ( | ) |
Returns the name of the pixel type as a string.
Definition at line 504 of file Pixel.cpp.
References Isis::ToString().
|
private |
|
private |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 07/13/2023 00:07:34 |