A method of reconstructing an image of a colon, including receiving scan data of a colon taken by an imaging capsule that traverses the colon; wherein the imaging capsule emits X-ray radiation inside the colon and includes detectors that detect photons that are returned toward the imaging capsule from X-ray fluorescence and Compton back scattering interactions responsive to the radiation; and wherein the scan data includes counts of photons detected by each detector from X-ray fluorescence and Compton back scattering interactions; defining an initial guess of a geometry of a contour of a slice of the colon; calculating count values for each detector responsive to the geometry using a forward model; comparing the calculated count values of each detector with the values from the scan data; if the results of the comparison do not indicate reaching an optimal match then adjust the defined geometry and repeat the calculating and comparing.