basic properties of a sample More...
#include <lti_sample.h>
Public Member Functions | |
LTISample (lt_uint16 srcBandIndex, LTIColor color, LTIDataType dataType, const void *data=NULL) | |
default constructor | |
LTISample () | |
LTISample (const LTISample &) | |
copy constructor | |
virtual | ~LTISample () |
destructor | |
virtual LTISample & | operator= (const LTISample &) |
assignment operator | |
bool | operator== (const LTISample &) const |
equality operator | |
bool | operator!= (const LTISample &) const |
equality operator | |
lt_uint16 | getSourceBandIndex () const |
get the sample source band index | |
LTIDataType | getDataType () const |
get the sample datatype | |
LTIColor | getColor () const |
get the color | |
void | setPrecision (lt_uint32 precision) |
sets the precision of the sample | |
lt_uint32 | getPrecision () const |
returns the precision of the sample | |
lt_uint32 | getNumBytes () const |
get the size of a sample | |
LT_STATUS | checkImpedance (const LTISample &sample) const |
returns status code comparing two samples | |
bool | isValueMin () const |
is the sample value minimum | |
bool | isValueMax () const |
is the sample value maximum | |
void | setValueToMin () |
sets the sample value minimum | |
void | setValueToMax () |
sets the sample value maximum | |
void | setValueToMin (const LTISample &) |
sets the sample value minimum | |
void | setValueToMax (const LTISample &) |
sets the sample value maximum | |
Sample value functions | |
void | setValueAddr (const void *) |
const void * | getValueAddr () const |
void | setValueUint8 (lt_uint8) |
void | setValueUint16 (lt_uint16) |
void | setValueUint32 (lt_uint32) |
void | setValueSint8 (lt_int8) |
void | setValueSint16 (lt_int16) |
void | setValueSint32 (lt_int32) |
void | setValueFloat32 (float) |
void | setValueFloat64 (double) |
lt_uint8 | getValueUint8 () const |
lt_uint16 | getValueUint16 () const |
lt_uint32 | getValueUint32 () const |
lt_int8 | getValueSint8 () const |
lt_int16 | getValueSint16 () const |
lt_int32 | getValueSint32 () const |
float | getValueFloat32 () const |
double | getValueFloat64 () const |
void | setValueFromDouble (double) |
double | getValueAsDouble () const |
This class stores the basic properties of a sample: the color and the datatype. A set of one or more (possibly dissimilar) LTISample objects is used in the representation of a pixel (LTIPixel).
Definition at line 28 of file lti_sample.h.
LTISample::LTISample | ( | lt_uint16 | srcBandIndex, | |
LTIColor | color, | |||
LTIDataType | dataType, | |||
const void * | data = NULL | |||
) |
This constructor creates an LTISample object with the given properties.
srcBandIndex | the location in the source image | |
color | the sample's color | |
dataType | the datatype of the sample | |
data | initial data for sample value (defaults to 0) |
LTISample::LTISample | ( | ) |
LTISample::LTISample | ( | const LTISample & | ) |
virtual LTISample::~LTISample | ( | ) | [virtual] |
Returns status code comparing two samples. This is just a different version of operator==, which returns a status code instead of a bool.
sample | the sample to compare this sample to |
LTIColor LTISample::getColor | ( | ) | const |
This function returns the color of the sample.
LTIDataType LTISample::getDataType | ( | ) | const |
This function returns the datatype of the sample.
lt_uint32 LTISample::getNumBytes | ( | ) | const |
This function returns the size of the sample, in bytes.
This is equivalent to calling LTITypes::getNumBytes(getDataType()).
lt_uint32 LTISample::getPrecision | ( | ) | const |
Returns the precision of the sample.
lt_uint16 LTISample::getSourceBandIndex | ( | ) | const |
This function returns the source band index of the sample.
const void* LTISample::getValueAddr | ( | ) | const |
double LTISample::getValueAsDouble | ( | ) | const |
float LTISample::getValueFloat32 | ( | ) | const |
double LTISample::getValueFloat64 | ( | ) | const |
lt_int16 LTISample::getValueSint16 | ( | ) | const |
lt_int32 LTISample::getValueSint32 | ( | ) | const |
lt_int8 LTISample::getValueSint8 | ( | ) | const |
lt_uint16 LTISample::getValueUint16 | ( | ) | const |
lt_uint32 LTISample::getValueUint32 | ( | ) | const |
lt_uint8 LTISample::getValueUint8 | ( | ) | const |
bool LTISample::isValueMax | ( | ) | const |
Returns true if the sample's value is the datatype's maximum.
bool LTISample::isValueMin | ( | ) | const |
Returns true if the sample's value is the datatype's minimum.
bool LTISample::operator!= | ( | const LTISample & | ) | const |
bool LTISample::operator== | ( | const LTISample & | ) | const |
void LTISample::setPrecision | ( | lt_uint32 | precision | ) |
Sets the precision of the sample. By default, the number of bits of precision is equal to the number of bits in the underlying datatype.
precision | the number of bits |
void LTISample::setValueAddr | ( | const void * | ) |
void LTISample::setValueFloat32 | ( | float | ) |
void LTISample::setValueFloat64 | ( | double | ) |
void LTISample::setValueFromDouble | ( | double | ) |
void LTISample::setValueSint16 | ( | lt_int16 | ) |
void LTISample::setValueSint32 | ( | lt_int32 | ) |
void LTISample::setValueSint8 | ( | lt_int8 | ) |
void LTISample::setValueToMax | ( | const LTISample & | ) |
Sets the sample's value to max of itself and the argument. (The argument sample assumed to have the same datatype.)
void LTISample::setValueToMax | ( | ) |
Sets the sample's value to the datatype's maximum.
void LTISample::setValueToMin | ( | const LTISample & | ) |
Sets the sample's value to the min of itself and the argument (The argument sample assumed to have the same datatype.)
void LTISample::setValueToMin | ( | ) |
Sets the sample's value to the datatype's minimum.
void LTISample::setValueUint16 | ( | lt_uint16 | ) |
void LTISample::setValueUint32 | ( | lt_uint32 | ) |
void LTISample::setValueUint8 | ( | lt_uint8 | ) |
LizardTech |