SpaceConventionclass, specifying also the stack shape:
bg.SpaceConventionobject, or a valid origin specification plus a shape (the shape is required only if axes flips are required).
SpaceConventionclass can deal also with stack resampling/padding/cropping. This requires simply specifying values for resolutions and offsets when instantiating a
SpaceConventionobject. Once that is done, using
SpaceConvention.transformation_matrix_tocreating affine transformation matrices from one space to the other will be a piece of cake!