Description
A precalculated output shape is needed for rotations that use affine_transform
from Dask. The calculation is currently done by transforming the corners of the volume into the new space and extracting the full size. This calculation can result in fractional sizes which are incompatible as an input to affine_transform
. The function deals with this by calling np.round
before converting to int
. However, this function converts to the nearest even number when the provided value is exactly between two integers (x.5
).
Most atlases and data shouldn't have any data in the outer most pixels, however for consistency, I think this should always return the ceiling, rather than floor or ceiling as np.round
currently does.
brainglobe-registration/brainglobe_registration/utils/utils.py
Lines 187 to 195 in 027493c