handle axes swap and voxel ordering correctly
fix to maintain compatibility with nimsproc