ExternalInterface class
Support for external interfaces.
Contents
- Reference
Software using DIPlib might want to control how the image data is allocated. Such software
should derive a class from this one, and assign a pointer to it into each of the images that
it creates, through dip::Image::SetExternalInterface. The caller will maintain ownership of
the interface.
See Define an image’s allocator for details on how to use the external interfaces.
Derived classes
-
class dip::
AlignedAllocInterface dip::ExternalInterfacethat allocates aligned data. more...-
class dip_opencv::
ExternalInterface - This class is the
dip::ExternalInterfacefor the OpenCV interface. more... -
class dml::
MatlabInterface - This class is the
dip::ExternalInterfacefor the MATLAB interface. more...
Functions
- auto AllocateData(void*& origin, dip::DataType dataType, dip::UnsignedArray const& sizes, dip::IntegerArray& strides, dip::Tensor const& tensor, dip::sint& tensorStride) -> dip::DataSegment pure virtual
- Allocates the data for an image. The function is required to set
strides, more...
Function documentation
dip::DataSegment AllocateData( void*& origin, dip::DataType dataType, dip::UnsignedArray const& sizes, dip::IntegerArray& strides, dip::Tensor const& tensor, dip::sint& tensorStride) pure virtual
Allocates the data for an image. The function is required to set strides,
tensorStride and origin, and return a dip::DataSegment that owns the
allocated data segment. origin does not need to be the same pointer as
stored in the returned dip::DataSegment. For example, the latter can point
to a container object (e.g. std::vector), and origin can point to data
owned by the container object (e.g. std::vector::data()).
Note that strides and tensorStride might have been set by the user before
calling dip::Image::Forge, and should be honored if possible.