An image processing method comprising the steps of: acquiring phase images (Dx, Dy) providing visualization of electromagnetic fields respectively present in a plurality of columns of atoms of a sample, the columns of atoms being aligned in the direction of the thickness of the sample, wherein said phase images (Dx, Dy) are produced by providing visualization of phase variations that an electron beam undergoes from each of the electromagnetic fields in the plurality of columns; analyzing the period of electric fields of the electromagnetic fields; separating each of the electromagnetic fields in the columns within the phase images (Dx, Dy) into magnetic field and electric field components; and generating an image representative of a magnetic field distribution based on the separated magnetic field components; wherein the step of separating each of the electromagnetic fields in the columns includes the step of separating the electromagnetic field in a first one of the plurality of columns into magnetic field and electric field components based on the electromagnetic field in a second one of the columns, the electromagnetic field in the second column having an electric field component oriented in the same direction as the electric field component of the electromagnetic field in the first column, and wherein in said step of separating the electromagnetic field in said first column into magnetic field and electric field components, the magnetic field component of the electromagnetic field in said first column is extracted based on the difference between the electromagnetic field in the first column and the electromagnetic field in said second column. acquiring phase images (Dx, Dy) providing visualization of electromagnetic fields respectively present in a plurality of columns of atoms of a sample, the columns of atoms being aligned in the direction of the thickness of the sample, wherein said phase images (Dx, Dy) are produced by providing visualization of phase variations that an electron beam undergoes from each of the electromagnetic fields in the plurality of columns; analyzing the period of electric fields of the electromagnetic fields; separating each of the electromagnetic fields in the columns within the phase images (Dx, Dy) into magnetic field and electric field components; and generating an image representative of a magnetic field distribution based on the separated magnetic field components; wherein the step of separating each of the electromagnetic fields in the columns includes the step of separating the electromagnetic field in a first one of the plurality of columns into magnetic field and electric field components based on the electromagnetic field in a second one of the columns, the electromagnetic field in the second column having an electric field component oriented in the same direction as the electric field component of the electromagnetic field in the first column, and wherein in said step of separating the electromagnetic field in said first column into magnetic field and electric field components, the magnetic field component of the electromagnetic field in said first column is extracted based on the difference between the electromagnetic field in the first column and the electromagnetic field in said second column.