diplib/geometry.h file

Functions for geometric image transformations See Geometric transformations.

Contents

Aliases

using dip::InterpolationFunctionPointer = void(*)(Image, Image::Pixel, FloatArray)
Pointer to an interpolation function. Only use pointers returned by dip::PrepareResampleAtUnchecked.

Functions

void dip::Wrap(dip::Image const& in, dip::Image& out, dip::IntegerArray wrap)
Shifts the input image by an integer number of pixels, wrapping the pixels around.
void dip::Subsampling(dip::Image const& in, dip::Image& out, dip::UnsignedArray const& sample)
Subsamples the input image.
void dip::Resampling(dip::Image const& in, dip::Image& out, dip::FloatArray zoom, dip::FloatArray shift = {0.0}, dip::String const& interpolationMethod = "", dip::StringArray const& boundaryCondition = {})
Resamples an image with the given zoom factor and sub-pixel shift.
void dip::Shift(dip::Image const& in, dip::Image& out, dip::FloatArray const& shift, dip::String const& interpolationMethod = S::FOURIER, dip::StringArray const& boundaryCondition = {})
Shift an image. Calls dip::Resampling with zoom set to 1, and uses the “ft” method by default.
void dip::ShiftFT(dip::Image const& in, dip::Image& out, dip::FloatArray shift = {0.0})
Modulates the input Fourier spectrum to introduce a shift in the spatial domain
void dip::ResampleAt(dip::Image const& in, dip::Image& out, dip::FloatCoordinateArray const& coordinates, dip::String const& interpolationMethod = S::LINEAR, dip::Image::Pixel const& fill = {0})
Finds the values of the image at sub-pixel locations coordinates by interpolation.
auto dip::ResampleAt(dip::Image const& in, dip::FloatArray const& coordinates, dip::String const& interpolationMethod = S::LINEAR, dip::Image::Pixel const& fill = {0}) -> dip::Image::Pixel
Identical to the previous function with the same name, but for a single point.
auto dip::PrepareResampleAtUnchecked(dip::Image const& in, dip::String const& interpolationMethod) -> dip::InterpolationFunctionPointer
Prepare for repeated calls to dip::ResampleAtUnchecked. See dip::ResampleAt.
auto dip::ResampleAtUnchecked(dip::Image const& in, dip::FloatArray const& coordinates, dip::InterpolationFunctionPointer function) -> dip::Image::Pixel
Similar to dip::ResampleAt, but optimized for repeated calls using the same parameters. function comes from PrepareResampleAtUnchecked. fill is always 0.
void dip::ResampleAt(dip::Image const& in, dip::Image const& map, dip::Image& out, dip::String const& interpolationMethod = S::LINEAR, dip::Image::Pixel const& fill = {0})
Resamples an image with sub-pixel locations specified by a coordinate map.
void dip::Skew(dip::Image const& in, dip::Image& out, dip::FloatArray const& shearArray, dip::uint axis, dip::String const& interpolationMethod = "", dip::StringArray const& boundaryCondition = {})
Skews (shears) an image
void dip::Skew(dip::Image const& in, dip::Image& out, dip::dfloat shear, dip::uint skew, dip::uint axis, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = {})
Skews (shears) an image
void dip::Rotation(dip::Image const& in, dip::Image& out, dip::dfloat angle, dip::uint dimension1, dip::uint dimension2, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = S::ADD_ZEROS)
Rotates an image in one orthogonal plane, over the center of the image.
void dip::Rotation2D(dip::Image const& in, dip::Image& out, dip::dfloat angle, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = S::ADD_ZEROS)
Rotates a 2D image
void dip::Rotation3D(dip::Image const& in, dip::Image& out, dip::dfloat angle, dip::uint axis = 2, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = S::ADD_ZEROS)
Rotates a 3D image in one orthogonal plane
void dip::Rotation3D(dip::Image const& in, dip::Image& out, dip::dfloat alpha, dip::dfloat beta, dip::dfloat gamma, dip::String const& interpolationMethod = "", dip::String const& boundaryCondition = S::ADD_ZEROS)
Applies an arbitrary 3D rotation to a 3D image
void dip::RotationMatrix2D(dip::Image& out, dip::dfloat angle)
Creates a 0D (one pixel) 2x2 matrix image containing a 2D rotation matrix.
void dip::RotationMatrix3D(dip::Image& out, dip::dfloat alpha, dip::dfloat beta, dip::dfloat gamma)
Creates a 0D (one pixel) 3x3 matrix image containing a 3D rotation matrix.
void dip::RotationMatrix3D(dip::Image& out, dip::FloatArray const& vector, dip::dfloat angle)
Creates a 0D (one pixel) 3x3 matrix image containing a 3D rotation matrix.
void dip::AffineTransform(dip::Image const& in, dip::Image& out, dip::FloatArray const& matrix, dip::String const& interpolationMethod = S::LINEAR)
Applies an arbitrary affine transformation to the 2D or 3D image.
void dip::WarpControlPoints(dip::Image const& in, dip::Image& out, dip::FloatCoordinateArray const& inCoordinates, dip::FloatCoordinateArray const& outCoordinates, dip::dfloat lambda = 0, dip::String const& interpolationMethod = S::LINEAR)
Warps an image based on a set of control points using thin plate spline interpolation
void dip::LogPolarTransform2D(dip::Image const& in, dip::Image& out, dip::String const& interpolationMethod = S::LINEAR)
Computes the log-polar transform of the 2D image.
void dip::Tile(dip::ImageConstRefArray const& in, dip::Image& out, dip::UnsignedArray tiling = {})
Tiles a set of images to form a single image.
void dip::TileTensorElements(dip::Image const& in, dip::Image& out)
Tiles the tensor elements of in to produce a scalar image
void dip::Concatenate(dip::ImageConstRefArray const& in, dip::Image& out, dip::uint dimension = 0)
Concatenates a set of images along one dimension.
void dip::Concatenate(dip::Image const& in1, dip::Image const& in2, dip::Image& out, dip::uint dimension = 0)
Concatenates two images.
void dip::JoinChannels(dip::ImageConstRefArray const& in, dip::Image& out)
Concatenates a set of scalar images along the tensor dimension.
auto dip::SplitChannels(dip::Image const& in) -> dip::ImageArray
Splits the tensor elements of a tensor image into individual images.