In this invention, a method for imaging the cross section of a vessel for detecting the flow of cells using spectrally encoded imaging was developed. This method provides visual information on the scattering particles, including their size, shape, brightness, as well as their location within the vessel. Such information could significantly increase the accuracy of flow cytometry and provide additional capabilities, such as cell sorting and the modification and destruction of specific cells. Potential applications include in-vivo and ex-vivo flow cytometry for industrial and clinical applications. For in-vivo applications, the compact dimensions and simplicity of the probe, which is approximately 20 x 5 x 5 mm in size with no moving parts, could enable endoscopic flow cytometry in various locations in the body.