IOLink
IOL_v1.1.0_release
|
This class contains the algorithms used to copy data beetween two regions of N dimensionnal data. More...
#include <iolink/RegionCopier.h>
Public Member Functions | |
RegionCopier (const Indexer &srcIndexer, const Indexer &dstIndexer, const VectorXu64 &srcOrigin, const VectorXu64 &dstOrigin, const VectorXu64 ®ionSize, DataType dataType) | |
Build a copier with all the parameters. More... | |
RegionCopier (const Indexer &srcindexer, const RegionXu64 &srcRegion, DataType dataType) | |
Shortened constructor in the case if the destination has the same dimensions as the region itself. More... | |
RegionCopier (const RegionXu64 &dstRegion, const Indexer &dstIndexer, DataType dataType) | |
Shortened constructor in the case if the source has the same dimensions as the region itself. More... | |
RegionCopier (const RegionCopier &other) | |
Copy constructor. More... | |
RegionCopier & | operator= (const RegionCopier &other) |
Assignation operator. More... | |
~RegionCopier () | |
Destructor. | |
void | copy (const uint8_t *src, uint8_t *dst) |
Copy data from memory, to memory. More... | |
void | copy (std::shared_ptr< RandomAccess > src, uint8_t *dst) |
Copy data from a storage to memory. More... | |
void | copy (const uint8_t *src, std::shared_ptr< RandomAccess > dst) |
Copy data from memory to a storage. More... | |
This class contains the algorithms used to copy data beetween two regions of N dimensionnal data.
* SOURCE DESTINATION * ------------- -------- * | o---- | | o---- | * | | --|-|---|-|-> | | * | | | | | | | | * | ---- | | ---- | * | | -------- * | | * ------------- *
The methods of this class will copy one region in the source, to another in the destination. With some conditions: the source region and the destination one must have exactly the same size, and the source and the destination must share the same DataType.
iolink::RegionCopier::RegionCopier | ( | const Indexer & | srcIndexer, |
const Indexer & | dstIndexer, | ||
const VectorXu64 & | srcOrigin, | ||
const VectorXu64 & | dstOrigin, | ||
const VectorXu64 & | regionSize, | ||
DataType | dataType | ||
) |
Build a copier with all the parameters.
srcIndexer | An indexer used to access source |
dstIndexer | An indexer used to access destination |
srcOrigin | Position where the first sample will be read |
dstOrigin | Position where the first sample will be written |
regionSize | The size of the region to copy |
dataType | The type of data stored in the source and the destination |
iolink::RegionCopier::RegionCopier | ( | const Indexer & | srcindexer, |
const RegionXu64 & | srcRegion, | ||
DataType | dataType | ||
) |
Shortened constructor in the case if the destination has the same dimensions as the region itself.
Used for example when reading a part of an image into a buffer.
srcindexer | An indexer used to access source |
srcRegion | region to copy from the source |
dataType | datatype of source data |
iolink::RegionCopier::RegionCopier | ( | const RegionXu64 & | dstRegion, |
const Indexer & | dstIndexer, | ||
DataType | dataType | ||
) |
Shortened constructor in the case if the source has the same dimensions as the region itself.
Used for example to write data stored in a buffer into a part of an image.
dstRegion | region destination to fill |
dstIndexer | An indexer used to access destination |
dataType | datatype of data |
iolink::RegionCopier::RegionCopier | ( | const RegionCopier & | other | ) |
Copy constructor.
other | RegionCopier to use as model |
void iolink::RegionCopier::copy | ( | const uint8_t * | src, |
std::shared_ptr< RandomAccess > | dst | ||
) |
Copy data from memory to a storage.
src | A pointer to the data to copy |
dst | A RandomAccess used to write data |
void iolink::RegionCopier::copy | ( | const uint8_t * | src, |
uint8_t * | dst | ||
) |
Copy data from memory, to memory.
src | A pointer to the data to copy |
dst | A pointer where to copy the data |
void iolink::RegionCopier::copy | ( | std::shared_ptr< RandomAccess > | src, |
uint8_t * | dst | ||
) |
Copy data from a storage to memory.
src | A RandomAccess used to read data |
dst | A pointer where to copy the data |
RegionCopier& iolink::RegionCopier::operator= | ( | const RegionCopier & | other | ) |
Assignation operator.
other | RegionCopier to use for assignment |