the present invention describes a method and apparatus to localize the electrical signals measured from a subject &# 39 ; s scalp surface , preferably in near - real time , and to generate dynamic three - dimensional information of the electrical activity occurring within the cerebral cortex of the brain . in the preferred embodiment , it can produce images that can be immediately inspected and analyzed by an operator in near - real time , resulting in a powerful new cortical imaging modality , which we denote as dynamic electrocortical imaging . the present invention involves the use of a computer , an electroencephalographic amplifier , eeg electrodes , and custom software . it can measure healthy and diseased cortical events and states in both conscious and unconscious subjects . this is useful , as it allows for the diagnosis , monitoring and treatment of cortical disorders , while also furthering the understanding of the human brain and lending use to additional non - medical applications such as in entertainment , education , lie - detection and industry . the invention in one embodiment is implemented using software in conjunction with readily available eeg hardware . furthermore , this same method can be applied to pre - existing data and when doing so , eeg hardware is not required . having a practical near - real time 3d imaging system brings a far more accessible technology to doctors , researchers , individuals , and private clinics to better diagnose , monitor , treat and understand many of the conditions and abnormalities of the brain .