stack[0, :, :]
with matplotlib or when you open the stack with ImageJ. First dimension is the one that you are slicing, the second the height of the image, and the third the width of the image.SpaceConvention
classSpaceConvention
class, specifying also the stack shape:bg.SpaceConvention
object, or a valid origin specification plus a shape (the shape is required only if axes flips are required).SpaceConvention
class can deal also with stack resampling/padding/cropping. This requires simply specifying values for resolutions and offsets when instantiating a SpaceConvention
object. Once that is done, using SpaceConvention.transformation_matrix_to
creating affine transformation matrices from one space to the other will be a piece of cake!