IOLink
IOL_v1.2.0_release
|
Interface representing an N dimensional image. More...
#include <iolink/view/ImageView.h>
Public Member Functions | |
size_t | dimensionCount () |
Returns the dimension of the View. | |
bool | support (ImageCapabilitySet flags) |
Checks if the ImageView supports the given capabilities. | |
virtual ImageCapabilitySet | capabilities () const =0 |
Return the capabilities of this image. | |
virtual const VectorXu64 & | shape ()=0 |
Return the shape of the image, each component containing the size in this dimension. More... | |
virtual DataType | dataType ()=0 |
Return the data type of the samples of this image. | |
virtual std::shared_ptr< const ImageProperties > | properties ()=0 |
Return the view's properties. | |
std::string | toString () const |
Return a string representation. | |
virtual std::shared_ptr< const MetadataNode > | metadata () const |
Return the root node of the metadata attached to this image. More... | |
virtual void | read (const VectorXu64 &index, void *dst) |
Read the data at the given index into a buffer. More... | |
virtual void | readRegion (const RegionXu64 ®ion, void *dst) |
Read a region of the image into a buffer. More... | |
virtual void | setProperties (std::shared_ptr< const ImageProperties > properties) |
Update the image's properties. More... | |
virtual void | setMetadata (std::shared_ptr< MetadataNode > metadata) |
Attach a new metadata node to the image. More... | |
virtual void | write (const VectorXu64 &index, const void *src) |
Write value from a buffer at the given index. More... | |
virtual void | writeRegion (const RegionXu64 ®ion, const void *src) |
Write a input buffer into a given region of the image. More... | |
virtual void | reshape (const VectorXu64 &shape, DataType dataType) |
Change the shape and sample data type of the image. More... | |
virtual const Indexer & | indexer () |
Return an Indexer describing the memory layout of the buffer. More... | |
virtual void * | buffer () |
Return a mutable pointer to the internal memory buffer. More... | |
virtual const void * | bufferReadOnly () const |
Return an immutable pointer to the internal memory buffer. More... | |
virtual size_t | bufferSize () |
Size in bytes of the internal buffer. More... | |
std::shared_ptr< TilingInfoExtension > | tilingInfo () |
Public Member Functions inherited from iolink::View | |
virtual std::shared_ptr< Extension > | extension (size_t id) |
Get an extension of the view, corresponding to the given identifier. More... | |
Interface representing an N dimensional image.
This class can handle multidimensional image, for example:
This interface capabilities are indicated by the ImageCapabilitySet returned by the method ImageView::capabilities. Each capability enable the use of a specific set of methods. When one of those methods is called, if its corresponding capability is not supported, a NotImplemented exception will be thrown.
An ImageView is composed of the following parts:
|
virtual |
Return a mutable pointer to the internal memory buffer.
Available when the ImageView has the MEMORY_ACCESS capability.
NotImplemented | If the implementation does not support memory access. |
|
virtual |
Return an immutable pointer to the internal memory buffer.
Available when the ImageView has the MEMORY_ACCESS capability.
NotImplemented | If the implementation does not support memory access. |
|
virtual |
Size in bytes of the internal buffer.
Available when the ImageView has the MEMORY_ACCESS capability.
NotImplemented | If the implementation does not support memory access. |
|
virtual |
Return an Indexer describing the memory layout of the buffer.
Available when the ImageView has the MEMORY_ACCESS capability.
NotImplemented | If the implementation does not support memory access. |
|
virtual |
Return the root node of the metadata attached to this image.
Available when the ImageView has the READ capability.
NotImplemented | If the implementation does not support reading. |
|
virtual |
Read the data at the given index into a buffer.
Available when the ImageView has the READ capability.
Default implementation will call the readRegion method with a region of one pixel.
index | the index of the sample to read. |
dst | The buffer where read data will be copied. |
|
virtual |
Read a region of the image into a buffer.
Available when the ImageView has the READ capability.
region | The region of the image to read from. |
dst | The buffer where read data will be copied. |
NotImplemented | If the implementation does not support reading. |
|
virtual |
Change the shape and sample data type of the image.
Available when the ImageView has the RESHAPE capability.
All the image's data is invalidated after this operation.
shape | The new shape. |
dataType | The new sample data type. |
NotImplemented | If the implementation does not support reshaping. |
|
virtual |
Attach a new metadata node to the image.
Available when the ImageView has the WRITE capability.
NotImplemented | If the implementation does not support writing. |
|
virtual |
Update the image's properties.
Available when the ImageView has the WRITE capability.
NotImplemented | If the implementation does not support writing. |
|
pure virtual |
Return the shape of the image, each component containing the size in this dimension.
Example:
|
virtual |
Write value from a buffer at the given index.
Available when the ImageView has the WRITE capability.
Default implementation will call the writeRegion method with a region of one pixel.
index | The index of the image's sample to write. |
src | The buffer containing the data that will be written. |
|
virtual |
Write a input buffer into a given region of the image.
Available when the ImageView has the WRITE capability.
region | The region to write. |
src | The buffer containing the data that will be written. |
NotImplemented | If the implementation does not support writing. |