Images & coordinates#

DarSIA represents an image as an (n + 1)-dimensional array carrying a physical interpretation: n spatial dimensions plus an optional time axis, with a scalar or vectorial range. All images share the Image interface; ScalarImage and OpticalImage are convenience specialisations.

A CoordinateSystem translates between voxel indices and Cartesian coordinates, so subregions, patches and regions of interest can be addressed in metres rather than pixels.

Image containers#

Image(img[, transformations])

An image with physical meaning.

ScalarImage(img[, transformations])

Special case of a space-time image, with 1d data, e.g., monochromatic photographs.

OpticalImage(img[, transformations])

Special case of 2d trichromatic optical images, typically originating from photographs.

Coordinate systems#

CoordinateSystem(img)

Class for coordinate system for general space-time images.

CoordinateTransformation(...[, fit_options])

General affine transformation (translation, scaling, rotation), applicable for general (up to 4d) images.

check_equal_coordinatesystems(...[, ...])

Check whether two coordinate systems are equivalent, i.e., they share basic attributes.

Regions, patches and subregions#

Patches(img, num_patches, **kwargs)

A full image tiled into a regular array of patches.

ROI(coordinates)

Polygonal region of interest (ROI) in global (physical) coordinates for darsia.Image.

extract_quadrilateral_ROI(img_src[, ...])

Extract a quadrilateral ROI via a perspective transform.

Image arithmetic#

weight(img, weight)

Scalar or element-wise weight of images.

superpose(images)

Superposition of images with possibly incompatible coordinatesystems.

stack(images)

Append images from list and create a new image.

Advanced#

ExtensiveImage(img[, transformations])

Image type for extensive quantities stored per voxel.

interpret_indexing(axis, indexing)

Interpret an axis and the indexing convention of an image.

to_matrix_indexing(axis, indexing)

Conversion of single axis in Cartesian to matrix indexing.

to_cartesian_indexing(axis, indexing)

Conversion of single axis in matrix indexing to Cartesian indexing.

matrixToCartesianIndexing(img[, dim])

Reordering data indexing converting from (row,col) to (x,y) indexing.

cartesianToMatrixIndexing(img)

Reordering data indexing, converting from (x,y) to (row,col) indexing.