ChannelData adds sample values to the ChannelInfo class.
More...
#include <PointData.h>
|
static void | copy (ChannelData &dst, size_t dstOffset, const ChannelData &src, size_t srcOffset, size_t length) |
| Copy samples between channels. More...
|
|
static void | convert (ChannelData &dst, size_t dstOffset, const ChannelData &src, size_t srcOffset, size_t length) |
| Copy and convert the data type of samples between channel. More...
|
|
static void | convert (ChannelData &dst, size_t dstOffset, const ChannelData &src, size_t srcOffset, double offset, double scale, size_t length) |
| Copy and convert the data type of samples between channel. More...
|
|
Definition at line 290 of file PointData.h.
ChannelData::~ChannelData |
( |
void |
| ) |
|
ChannelData::ChannelData |
( |
void |
| ) |
|
static void ChannelData::convert |
( |
ChannelData & |
dst, |
|
|
size_t |
dstOffset, |
|
|
const ChannelData & |
src, |
|
|
size_t |
srcOffset, |
|
|
size_t |
length |
|
) |
| |
|
static |
This function does a datatype convertion as it copies the source samples into the destination channel. This function does not support changing between integral and floating point types.
- Parameters
-
dst | the destination channel |
dstOffset | the first sample to overwrite |
src | the source channel |
srcOffset | the fisrt sample to copy |
length | the number of samples to copy |
- Note
- The source and destination may not be the same object.
static void ChannelData::convert |
( |
ChannelData & |
dst, |
|
|
size_t |
dstOffset, |
|
|
const ChannelData & |
src, |
|
|
size_t |
srcOffset, |
|
|
double |
offset, |
|
|
double |
scale, |
|
|
size_t |
length |
|
) |
| |
|
static |
This function does a datatype convertion as it copies the source samples into the destination channel. This function does support changing between integral and floating point types.
- Parameters
-
dst | the destination channel |
dstOffset | the first sample to overwrite |
src | the source channel |
srcOffset | the fisrt sample to copy |
offset | the quantization offset |
scale | the quantization scale |
length | the number of samples to copy |
- Note
- The source and destination may not be the same object.
-
When converting integer to float: dst = scale * src + offset.
-
When converting float to integer: dst = floor((src - offset) / scale + 0.5)
static void ChannelData::copy |
( |
ChannelData & |
dst, |
|
|
size_t |
dstOffset, |
|
|
const ChannelData & |
src, |
|
|
size_t |
srcOffset, |
|
|
size_t |
length |
|
) |
| |
|
static |
- Parameters
-
dst | the destination channel |
dstOffset | the first sample to overwrite |
src | the source channel |
srcOffset | the fisrt sample to copy |
length | the number of samples to copy |
- Note
- The source and destination data types must be the same. The source and destination may be the same object and sample ranges may overlap.
const void* ChannelData::getData |
( |
void |
| ) |
const |
This method returns the data buffer. The caller must cast it to the appropriate datatype.
- See also
- getDataType()
void* ChannelData::getData |
( |
void |
| ) |
|
This method returns the data buffer. The caller must cast it to the appropriate datatype.
- See also
- getDataType()
size_t ChannelData::getNumSamples |
( |
void |
| ) |
const |
This method returns the maximum number of samples that can be stored in the object.
void ChannelData::init |
( |
const ChannelInfo & |
info, |
|
|
size_t |
numSamples |
|
) |
| |
void ChannelData::resize |
( |
size_t |
newNumSamples | ) |
|
This method change the size of the data buffer.
- Parameters
-
newNumSamples | the new size of the buffer |
void ChannelData::setData |
( |
void * |
data, |
|
|
bool |
deleteData |
|
) |
| |
void ChannelData::setDataType |
( |
DataType |
datatype | ) |
|
This method is used to change the data type on the fly. Use with care and it should only be used went the new data type is smaller than the old data type.
- Note
- internal LizardTech use only.
void ChannelData::setOffset |
( |
size_t |
offset | ) |
|
void* ChannelData::m_data |
|
protected |
bool ChannelData::m_deleteData |
|
protected |
size_t ChannelData::m_numSamples |
|
protected |
size_t ChannelData::m_offset |
|
protected |
The documentation for this class was generated from the following file: