Spatial API
References
NeuroCore.SpatialAPI.pixel_spacing
— Methodpixel_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
.
NeuroCore.SpatialAPI.sdims
— Methodsdims(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
.
NeuroCore.SpatialAPI.spatial_axes
— Methodspatial_axes(x, sz; kwargs...)
Returns an AxesIterator
along the spatial axes.
NeuroCore.SpatialAPI.spatial_axes
— Methodspatial_axes(x) -> Tuple
Returns a tuple of each axis corresponding to a spatial dimensions.
NeuroCore.SpatialAPI.spatial_directions
— Methodspatial_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.
NeuroCore.SpatialAPI.spatial_indices
— Methodspatial_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.
NeuroCore.SpatialAPI.spatial_keys
— Methodspatial_keys(x)
NeuroCore.SpatialAPI.spatial_order
— Methodspatial_order(x) -> Tuple{Vararg{Symbol}}
Returns the dimnames
of x
that correspond to spatial dimensions.
NeuroCore.SpatialAPI.spatial_size
— Methodspatial_size(x) -> Tuple{Vararg{Int}}
Return a tuple listing the sizes of the spatial dimensions of the image.
NeuroCore.SpatialAPI.spatialdims
— Methodspatialdims(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.
NeuroCore.SpatialAPI.affine_map
— Methodaffine_map(x) -> AffineMap
Returns and affine map. By default using spatial_directions
and pixel_spacing
are used to constuct the mapping.
NeuroCore.SpatialAPI.spatial_offset
— Methodspatial_offset(x)
The offset of each dimension (i.e., where each spatial axis starts).