Transform a d-dimensional image into a d by p matrix that encodes the spatial coordinates of the image domain.

imageDomainToSpatialMatrix(image, mask)

Arguments

image

input image

mask

optional input mask

Value

matrix is output

Author

Avants BB

Examples


img <- antsImageRead(getANTsRData("r16"))
spmat <- imageDomainToSpatialMatrix(img)