Why are you adding .5 here? Maybe to account for the voxel origin? But what if the voxel origin is not in the corner? You need to make this information clear in the docstrings.