The process begins with the preparation of a thin tissue section, which is then placed on a conductive surface. A laser or ion beam is used to ionize the molecules in the sample. These ionized molecules are then detected and measured by the mass spectrometer, generating a spectrum that provides information about the mass-to-charge ratio of the molecules. By scanning across the tissue section, IMS generates spatially-resolved molecular data, creating detailed molecular images.