Spatial API

References

NeuroCore.SpatialAPI.pixel_spacingMethod
pixel_spacing(x)

Return a tuple representing the separation between adjacent pixels along each axis of the image. Derived from the step size of each element of spatial_keys.

source
NeuroCore.SpatialAPI.sdimsMethod
sdims(x)

Return the number of spatial dimensions in the image. Defaults to the same as ndims, but with NamedDimsArray you can specify that some dimensions correspond to other quantities (e.g., time) and thus not included by sdims.

source
NeuroCore.SpatialAPI.spatial_directionsMethod
spatial_directions(img) -> (axis1, axis2, ...)

Return a tuple-of-tuples, each axis[i] representing the displacement vector between adjacent pixels along spatial axis i of the image array, relative to some external coordinate system ("physical coordinates").

By default this is computed from pixel_spacing, but you can set this manually using ImagesMeta.

source
NeuroCore.SpatialAPI.spatial_indicesMethod
spatial_indices(x)

Return a tuple with the indices of the spatial dimensions of the image. Defaults to the same as indices, but using NamedDimsArray you can mark some axes as being non-spatial.

source
NeuroCore.SpatialAPI.spatialdimsMethod
spatialdims(x) -> Tuple{Vararg{Int}}

Return a tuple listing the spatial dimensions of img. Note that a better strategy may be to use ImagesAxes and take slices along the time axis.

source
NeuroCore.SpatialAPI.affine_mapMethod
affine_map(x) -> AffineMap

Returns and affine map. By default using spatial_directions and pixel_spacing are used to constuct the mapping.

source