There are a few ways to calculate the magnetic phase shift of a 3D magnetization configuration. One that is particularly tailored to calculation of tilted samples is the algorithm proposed by Humphrey and De Graef. The idea behind their algorithm is to treat each voxel of the sample as if it were a sphere with constant magnetization. The Aharonov-Bohm phase shift caused by a sphere with constant magnetization is known analytically, so the full phase shift can be calculated as the sum of each of the individual voxels.
To start with the phase shift from a single sphere in Fourier space, from Humphrey et al. eq. H(8) is,
Above is the saturation induction (), is the volume of the sphere, is the radius of the sphere on the cubic lattice () here is the lattice constant, is the flux quantum , is the first spherical Bessel function of the first kind, is the Fourier frequency vector ( and are the components and magnitude of in the plane normal to the projection direction ()), and is the normalized magnetization unit vector expressed in the beams coordinate system. This can be further reduced by splitting up the geometric portion (invariant under rotation) with the magnetic portion to yield H(10)
Equation H(10) is for a uniformly magnetized sphere at the origin, to add a shift in real space we just need to add a linear phase in Fourier space. Adding this in and realizing that when tilting about the or axis only the components of parallel to the detector contribute then summing over the full lattice yields H(12) and H(13) (see paper for more details).
H(12) for a counter clockwise tilt around the x axis ,
H(13) for a counter clockwise tilt around the y axis ,
A Jupyter notebook demonstrating the use of my python implementation of this algorithm can be found here. Below is a video of the in-plane (perpendicular to the electron beam) magnetic induction of a spherical particle approximated by 29080 individual spherical voxels rotating 360° about the -axis.