diplib/library/image.h file

The dip::Image class and support functions. This file is always included through diplib.h. See Image.

Contents

Classes

class dip::ExternalInterface abstract
Support for external interfaces.
class dip::AlignedAllocInterface
dip::ExternalInterface that allocates aligned data.
class dip::CoordinatesComputer
Computes pixel coordinates based on an index or offset.
class dip::Image
Represents an image with all associated information.

Aliases

using dip::DataSegment = std::shared_ptr<void>
A dip::Image holds a shared pointer to the data segment using this type.
using dip::ImageArray = std::vector<Image>
An array of images
using dip::ImageRefArray = std::vector<std::reference_wrapper<Image>>
An array of image references
using dip::ImageConstRefArray = std::vector<std::reference_wrapper<const Image>>
An array of const image references

Functions

auto dip::NonOwnedRefToDataSegment(void* ptr) -> dip::DataSegment
This function converts a pointer to a dip::DataSegment that does not own the data pointed to.
auto dip::NonOwnedRefToDataSegment(void const* ptr) -> dip::DataSegment
This function converts a pointer to a dip::DataSegment that does not own the data pointed to.
auto dip::IsOnEdge(dip::UnsignedArray const& coords, dip::UnsignedArray const& sizes, dip::uint procDim = std::numeric_limits::max()) -> bool
Determines whether the pixel at coords is on the edge of an image of size sizes.
auto dip::Alias(dip::Image const& img1, dip::Image const& img2) -> bool
Calls img1.Aliases( img2 ). See dip::Image::Aliases.
void dip::DefineROI(dip::Image const& src, dip::Image& dest, dip::UnsignedArray origin = {}, dip::UnsignedArray sizes = {}, dip::UnsignedArray spacing = {})
Makes a new image object pointing to same pixel data as src, but with different origin, strides and size.
void dip::Copy(dip::Image const& src, dip::Image& dest)
Copies samples over from src to dest, identical to the dip::Image::Copy method.
void dip::Copy(dip::Image::View const& src, dip::Image& dest)
Copies samples over from src to dest, identical to the dip::Image::Copy method.
void dip::Copy(dip::Image const& src, dip::Image::View& dest)
Copies samples over from src to dest, identical to the dip::Image::View::Copy method.
void dip::Copy(dip::Image::View const& src, dip::Image::View& dest)
Copies samples over from src to dest, identical to the dip::Image::View::Copy method.
void dip::CopyFrom(dip::Image const& src, dip::Image& dest, dip::Image const& srcMask)
Copies the pixels selected by srcMask in src over to dest. dest will be a 1D image.
void dip::CopyFrom(dip::Image const& src, dip::Image& dest, dip::IntegerArray const& srcOffsets)
Copies the pixels selected by srcOffsets over from src to dest. dest will be a 1D image.
void dip::CopyTo(dip::Image const& src, dip::Image& dest, dip::Image const& destMask)
Copies all pixels from src over to the pixels selected by destMask in dest. dest must be forged.
void dip::CopyTo(dip::Image const& src, dip::Image& dest, dip::IntegerArray const& destOffsets)
Copies all pixels from src over to the pixels selected by destOffsets in dest. dest must be forged.
void dip::ExpandTensor(dip::Image const& src, dip::Image& dest)
Copies samples over from src to dest, expanding the tensor so it’s a standard, column-major matrix.
void dip::Convert(dip::Image const& src, dip::Image& dest, dip::DataType dt)
Copies samples over from src to dest, with data type conversion.
auto dip::CreateImageRefArray(dip::ImageArray& imar) -> dip::ImageRefArray
Creates a dip::ImageRefArray from a dip::ImageArray.
auto dip::CreateImageConstRefArray(dip::ImageArray const& imar) -> dip::ImageConstRefArray
Creates a dip::ImageConstRefArray from a dip::ImageArray.

Operators

auto dip::operator<<(std::ostream& os, dip::Image const& img) -> std::ostream&
You can output a dip::Image to std::cout or any other stream. Some information about the image is printed.