Reference

Reference

ImageMeta is an AbstractArray that can have metadata, stored in a dictionary.

Construct an image with ImageMeta(A, props) (for a properties dictionary props), or with ImageMeta(A, prop1=val1, prop2=val2, ...).

source
ImageAxes.dataFunction.
data(img::ImageMeta) -> array

Extract the data from img, omitting the properties dictionary. array shares storage with img, so changes to one affect the other.

See also: properties.

source
properties(imgmeta) -> props

Extract the properties dictionary props for imgmeta. props shares storage with img, so changes to one affect the other.

See also: data.

source
copyproperties(img::ImageMeta, data) -> imgnew

Create a new "image," copying the properties dictionary of img but using the data of the AbstractArray data. Note that changing the properties of imgnew does not affect the properties of img.

See also: shareproperties.

source
shareproperties(img::ImageMeta, data) -> imgnew

Create a new "image," reusing the properties dictionary of img but using the data of the AbstractArray data. The two images have synchronized properties; modifying one also affects the other.

See also: copyproperties.

source
spatialproperties(img)

Return a vector of strings, containing the names of properties that have been declared "spatial" and hence should be permuted when calling permutedims. Declare such properties like this:

img["spatialproperties"] = ["spacedirections"]
source
spacedirections(img)

Using ImageMetadata, you can set this property manually. For example, you could indicate that a photograph was taken with the camera tilted 30-degree relative to vertical using

img["spacedirections"] = ((0.866025,-0.5),(0.5,0.866025))

If not specified, it will be computed from pixelspacing(img), placing the spacing along the "diagonal". If desired, you can set this property in terms of physical units, and each axis can have distinct units.

source
Base.permutedimsFunction.
permutedims(img, perm, [spatialprops])

When permuting the dimensions of an ImageMeta, you can optionally specify that certain properties are spatial and they will also be permuted. spatialprops defaults to spatialproperties(img).

source