Reference
ImageMetadata.ImageMeta — Type.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, ...).
ImageAxes.data — Function.data(img::ImageMeta) -> arrayExtract the data from img, omitting the properties dictionary. array shares storage with img, so changes to one affect the other.
See also: properties.
ImageMetadata.properties — Function.properties(imgmeta) -> propsExtract the properties dictionary props for imgmeta. props shares storage with img, so changes to one affect the other.
See also: data.
ImageMetadata.copyproperties — Function.copyproperties(img::ImageMeta, data) -> imgnewCreate 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.
ImageMetadata.shareproperties — Function.shareproperties(img::ImageMeta, data) -> imgnewCreate 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.
ImageMetadata.spatialproperties — Function.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"]ImageCore.spacedirections — Function.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.
Base.permutedims — Function.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).