A neural imaging scan is used to test a patient's visual cortex.
In 2369, Doctor Julian Bashir performed one on Chief Miles O'Brien when he developed aphasia. (DS9: "Babel")