Close
About
FAQ
Home
Collections
Login
USC Login
Register
0
Selected
Invert selection
Deselect all
Deselect all
Click here to refresh results
Click here to refresh results
USC
/
Digital Library
/
University of Southern California Dissertations and Theses
/
Processing And Visualization In Functional Magnetic Resonance Imaging (Fmri) Of The Human Brain
(USC Thesis Other)
Processing And Visualization In Functional Magnetic Resonance Imaging (Fmri) Of The Human Brain
PDF
Download
Share
Open document
Flip pages
Contact Us
Contact Us
Copy asset link
Request this asset
Transcript (if available)
Content
INFORMATION TO USERS This manuscript has been reproduced from the microfilm master. UMI films the text directly from the original or copy submitted. Thus, some thesis and dissertation copies are in typewriter face, while others may be from any type of computer printer. The quality of this reproduction is dependent upon the quality of the copy submitted. Broken or indistinct print, colored or poor quality illustrations and photographs, print bleedthrough, substandard margins, and improper alignment can adversely afreet reproduction. In the unlikely event that the author did not send UMI a complete manuscript and there are missing pages, these will be noted. Also, if unauthorized copyright material had to be removed, a note will indicate the deletion. Oversize materials (e.g., maps, drawings, charts) are reproduced by sectioning the original, beginning at the upper left-hand comer and continuing from left to right in equal sections with small overlaps. Each original is also photographed in one exposure and is included in reduced form at the back of the book. Photographs included in the original manuscript have been reproduced xerographically in this copy. Higher quality 6” x 9” black and white photographic prints are available for any photographs or illustrations appearing in this copy for an additional charge. Contact UMI directly to order. UMI A Bell & Howell Information Company 300 North Zeeb Road, Ann Arbor MI 48106-1346 USA 313/761-4700 800/521-0600 PROCESSING AND VISUALIZATION IN FUNCTIONAL MAGNETIC RESONANCE IMAGING (fMRI) OF THE HUMAN BRAIN. by Louai Al-Dayeh A Thesis Presented to the FACULTY OF THE SCHOOL OF ENGINEERING UNIVERSITY OF SOUTHERN CALIFORNIA In Partial Fulfillment of the Requirements for the Degree MASTER OF SCIENCE IN BIOMEDICAL ENGINEERING May 1996 Copyright 1996 Louai Al-Dayeh UMI Number: 1380455 Copyright 1996 by Al-Dayeh, Louai All rights reserved. UMI Microform 1380455 Copyright 1996, by UMI Company. All rights reserved. This microform edition is protected against unauthorized copying under Title 17, United States Code. UMI 300 North Zccb Road Ann Arbor, MI 48103 This thesis, written by Louai Aldayeh under the guidance of Faculty Committee and approved by all its members, has been presented to and accepted by the School of Engineering in partial fulfillment of the re quirements for the degree of Master of .......................................... Date ________ Faculty Committee ____ Chairman * . Dedication: This work is dedicated to my very first teacher, and idol, my father, M uham m ad Ridwan Al-Dayeh, Ph.D.; the m an whom I owe every achievem ent. AcknozaCedgments: I would like to thank my committee chairman Manbir Singh, Ph.D., professor of radiology and biomedical engineering at USC., thank you Sir for believing in me; committee member, professor Robert E. Kalaba, the man who makes mathematics enjoyable; and committee member, assistant professor Jean-Michel Maarek, the man who vitalized my love for electronics. I thank you all for your guidance, and support. Special thanks to my research colleague, and friend, Pankaj Patel. TABLE OF CONTENTS: Page Number List of Figures. ............................................................................................. v 1. INTRODUCTION: 1 2. PHYSICS OF MRI: 2 2.1 T1 Relaxation................................................................................................ 5 2.2 T2 Relaxation................................................................................................ 5 2.3 T2* parameter............................................................................................... 5 3. MR IMAGING AND PULSE SEQUENCING: 7 3.1 Spin echo Pulse Sequence...........................................................................9 3.2 Gradient echo Pulse Sequence................................................................... 10 4. FUNCTIONAL MRI (fMRI).........................................................................12 4.1 METHODS OF fMRI SIGNAL PROCESSING: 16 4.1.1 Subtraction Technique.............................................................................16 4.1.2 Cross-Correlation Thresholding Technique........................................ 18 4.1.3 Combining Subtraction & Cross-Correlation......................................21 4.2 fMRI DATA ACQUISITION......................................................................21 4.3 PROCEDURE OF fMRI DATA PR O C ESSIN G :...................................23 4.3.1 Processing Algorithm.............................................................................. 23 4.3.2 Implementing The Processing Algorithm...........................................26 5. THE runfMRI "SOFTWARE", DESCRIPTION, AND USAGE. . . . 28 5.1 Applying "runfMRI" . 35 6. CONCLUSION. ................................................................................. 39 7. THE COMPLETE LISTING OF MATLAB® FILES.....................................40 8. REFERENCES.................................................................................................52 List of Figures: Page Number Fig. 1 Alignment of nuclei under the influence of external mag. field. 3 Fig. 2 Rotation of magnetic filed created by nuclei onto XY plane.. . . 4 Fig, 3 T1 and T2 relaxation. ..................................................................6 Fig. 4 Image acquisition by applying 3 gradients. ....................8 Fig. 5 Spin echo pulse sequence. ...................................................... 9 Fig. 6 Gradient echo pulse sequence................................................................10 Fig. 7 Anatomy of different brain regions......................................................12 Fig. 8 Change in T2* during functional activation in MRI..........................14 Fig. 9 Blood Oxygenation Level Dependent (BOLD) effect [15]. . . . 14 Fig. 10 The concept of image difference. ..............................................17 Fig. 11 An example of an actual pixel's time course..................................... 19 Fig. 12 Sagital slice showing the choice of 5 functional planes. . . . 22 Fig. 13 The whole interactive control window. .................................. 27 Fig. 14 Menu options, Colors, and Cropping........................................ 28 Fig. 15 The window while processing, the reading progress bar. . . . 29 Fig. 16 The processing progress bar.........................................................30 Fig. 17 The Color-map Sliders................................................................. 32 Fig. 18 The Correlation Coefficient Threshold Slider. ...................... 34 Fig. 19 The 256x256 pixels anatomical (spin-echo) image of plane#l. 36 Fig. 20 The 256x256 pixels first functional image of plane#l (total=64). 36 Fig. 21 The fMRI image of plane#l, different thresholding effect. . . . 37 Fig. 22 The final fMRI images of planes: 2, through 5. 38 v 1. INTRODUCTION: The Magnetic Resonance phenomenon has been the basis of an unprecedented number of unique and powerful techniques in biomedical research, as well as diagnostic clinical medicine. Functional M agnetic Resonance Imaging (fMRI), the unique noninvasive imaging modality, is one of the most important research areas as a prospective clinical diagnostic tool; it has proven to be an extremely useful utility for brain activation studies. Being completely noninvasive, and having the capability of a "luxurious" image resolution, fMRI has attracted the attention of many investigators and researchers in the engineering, imaging, and medical communities. This research project answers the question of the availability of a fMRI processing and visualization tool, which could be used by a physician, an MRI technician, or any person who might lack the capability, or simply the time, to write fMRI processing programs, let along having an adequate image viewer, to properly interpret the results. 1 2. PHYSICS OF MRI: [l, 2,3, & 4] Atoms, the basic elements of our universe, have nuclei. Certain nuclear species, such as protons, possess angular momentum (spinning along an imaginary axis), and bear electrical charge, which makes them behave like tiny microscopic magnets. Nuclei that contain an odd number of protons possess a relatively high magnetic moment. This property is utilized in Magnetic Resonance Imaging, since living tissues have these nuclei (*H, 2 H, 7 Li, I9 F ,...). When there is no magnetic field, the magnetic moment of each nucleus is randomly aligned, but when an external magnetic field is applied, the magnetic moment become aligned parallel & anti-parallel to the direction of this field; with the number of parallel-nuclei slightly higher than anti-parallel ones (fig. 1), resulting in a net magnetic moment (M) in the direction of external field (Bo) (fig. 2-a). But this magnetic field (M), is too small to measure, unless we "redirect" it, somehow, to be aligned in a different direction, usually, perpendicular to Bo (Z direction), i.e., the XV plane. Going back to the spinning particles, its spinning is not a simple one along an imaginary axis, it's actually combined with a precession of the imaginary axis at an angle theta to Bo, at certain angular frequency (0)o), a quantity described by the Larmor equation: 2 where F = Gyro magnetic ratio (MHz/T) Bo = The strength of the external field in Tesla Fig. 1: Alignment of nuclei under the influence of external magnetic field [After 22]. If the precessing nuclei were given a 90° (relative to Z) Radio Frequency (RF) signal, having exactly the same nuclei precessing frequency, then the magnetic field M can be flipped to the XY plane, were it could be measured (fig. 2-b). A phenomenon called magnetic resonance, the basis of MRI. Practically, the same RF transmitting coil ( situated in the transverse plane XY), could be used as the AC signal (RF echo) receiver (fig. 2-c). 3 Rftcehrer Coll Fig. 2: Rotation of magnetic filed created by nuclei onto X Y plane [After 2]. Right after applying the RF pulse, and under the influence of the strong external magnetic field Bo, the nuclei start restoring their original precession (along Z), and the AC signal (RF echo) starts decreasing due to dephasing of all nuclei; this decrease could be viewed from two, though simultaneous, different modalities, which define two major parameters in MRI: (i) T1 (spin-lattice or longitudinal) relaxation time constant. (ii) T2 (spin-spin or transverse) relaxation time constant. 4 A combined definition would be: the energy (gained from the RF pulse) is not only transferred from the nuclei to the lattice (Tl), but also transferred amongst nuclei (T2). 2.1 Tl Relaxation: It's the measure of how long it takes the transverse magnetization to achieve its initial value M along the z-axis. It reflects the loss of energy, gained originally by the RF pulse, to the lattice ( surrounding environment) (fig. 3), its behavior is an exponential growth. 2.2 T2 Relaxation: It's the measure of how long it takes the transverse magnetization to decay to zero, because the magnetic moment gets out of phase; provided the magnetic field is homogeneous (fig. 3), its behavior is an exponential decay. 2.3 T2* parameter (the realistic shorter equivalent of T2): Due to inhomogeneouty in the magnetic field, different nuclei experience slightly different external magnetic field, therefore they precess at slightly different angular frequency, which accelerates the dephasing of nuclei in the transverse (XY) plane. T l and T2 are tissue specific, (dependent on the molecular size and its corresponding tumbling rate). For example: Pure water (small molecules): Tl= 3 sec. Fat (larger molecules): Tl= few hundred msec. 5 M RI T l & T2 R el axat i on: Starting from zero magnetization in the Z direction, the z magnetization will grow to 63?o of its final maximum value in a time Tl. Stalling from a non zero value of the magnetization in the x-y plane: the x-y magnetization will decay so that it loses 03% of its initial value in a time T2. T2-veighted im age Fig. 3: Tl & T2 Relaxation [After 2 & 22]. 6 3. MR IMAGING AND PULSE SEQUENCING: [i,2,3,& 4] Brain MR images provide high contrast in-between white matter, gray matter, and cerebrospinal fluid (CSF). They have highly detailed spatial and temporal information concerning brain structures, because multiple tissue parameters can be manipulated through alterations in the imaging acquisition sequence. Several techniques are available for manipulating the signal's spatial information into making an image. An image can be reconstructed by the principle of computed tomography commonly using the two-dimensional Fourier transform (2DFT) technique. For transverse images, the gradient (Gz) along the magnetic field (Bo) serves as a slice selector during the excitation phase. The RF pulse is given a narrow band frequency spectrum which enables it to excite only the slice range where the resonance condition is satisfied. Each position alone the z direction is mapped to a unique resonance frequency; no signals will be detected outside the slice. The same principle of applying a gradient in the z direction to select a slice, is as well applied in the x, and y directions, in one of the most efficient ways in imaging modalities (fig. 4). Just like we can refer to a table element by its column and row address, we can encode the slice (i.e., x, and y -wise) such that a simple and direct 2DFT would give us the spatial signal in the form of 7 raw image matrix data. The key is to "frequency-encode" the x-gradient, and "phase -encode" the y-gradient. One of the unique conditions where applying a 2DFT gives us a spatial signal (of course the real part of this 2DFT); and this is by the way the reason why MRI images have dimensions as powers of two, since, in practice, the 2DFFT (Fast) is implemented. Fig. 4: Image acquisition by applying 3 gradients [After 22], The total imaging acquisition time is determined by the interval between the excitation pulses, called repetition time (TR); so, for an image of dimension 128x256, the total imaging acquisition time is 128,TR. There are three commonly used RF pulse sequences: spin-echo, inversion recovery, and gradient echo. Our current interest for this project is in spin-echo and gradient echo, which we have used to acquire anatomical and functional images respectively. 8 3.1 Spin echo Pulse Sequence: The spin-echo technique has several advantages in MR imaging: (1) T2- weighted images are possible by using this sequence, (2) it cancels the problem of magnetic field inhomogeneouties, and (3) the time window of the MR signal is easy to be determined. After a 90° pulse, the received signal decays with a time constant T2 (theoretically, T2* practically). When applying a 180° RF pulse at time x ms after the 90° pulse, the magnetization can be rephased at x ms later. This means by applying a 90-X-180 sequence, the magnetization can be rephased with T2 decay at time t=2x after the 90° pulse (fig. 5). The time interval between the 90° pulse and the echo is termed echo time (TE). RF 90° 180° J 1 _______________ Transverse m agnetization Q 0 ® Fig. 5: Spin echo pulse sequence [After 13]. 9 In practice, instead of a single spin-echo pulse sequence, several 90-x- 80 pulses at intervals of 0.5-5.0 sec. are used as the entire sequence for higher S /N ratio. This sequence is not suitable for functional MR imaging due to low sensitivity to T2*. 3.2 Gradient echo Pulse Sequence: The gradient echo pulse sequence reflects the effect of T24 , where the amplitude of the transverse magnetization is related to T2* right after the RF pulse excitation. The RF pulse used here is usually less than 90°. Gradient pulses causes the dephasing; at the end of the first gradient pulse, the net transverse magnetization is almost vanished, the second gradient causes an echo when the second pulse duration is as long as the first one (fig. 6). G radient Transverse mac 0 © Q e Fig. 6: Gradient echo pulse sequence [After 13]. 10 Gradient-echo image and FLASH (Fast Low Angle Shot) pulse sequences have been used recently for functional studies due to high sensitivity to T2*. In addition to its flexible resolution and high contrast for many tissues of interest (brain, soft tissues,...)/ the fact that MRI is a harmless procedure, (so fare no known side effect found for the diagnostic magnetic field dose), makes it a very desirable imaging modality. The reason why seeking a functional MRI is a current high priority, and developing new procedures and new processing techniques is the aim of many academic and medical institutions. No method is unimportant, and no technique is worthless, until they are investigated to the extreme, to judge their validity. 11 4. FUNCTIONAL MRI (fMRI): Although still in its youth years, functional MRI, is a very promising imaging, and (prospective) clinical diagnosis tool; since it is very useful in localizing the activation in certain areas of the brain (fig. 7) in response to certain stimuli, and requires a simple noninvasive (though lengthy) procedure. The validity of fMRI research findings is based on comparative studies, to current valid imaging modalities such as Positron Emission Tomography (PET), Single Positron Emission Com puted Tomography (SPECT), as well as other physiological and medical studies. [8,11, & 18] Fig. 7: Anatomy of different brain regions [After 22]. 12 It has been suggested by PET studies [8, & 18], that most of the brain activation metabolism is glycolyctic (rather than oxidative); w ith significant increase of approximately 30% to 50% for blood flow, compared to a modest (approximate) 5% increase in oxygen metabolism [9, & 16]. Because oxyhemoglobin is diamagnetic, and deoxyhemoglobin is paramagnetic, the last induces an inhomogeneous magnetic field in tissue surrounding blood vessels, causing transverse dephasing; so, a decrease in deoxyhemoglobin concentration (due to large am ount of oxyhemoglobin supply) means less dephasing, in other words longer T2* (fig. 8), therefore an intensity increase in the T2* weighted images, i.e., a source of contrast in the images, from a functional (neuronal activity) origin. This was termed: Blood Oxygen Level Dependent (BOLD) effect (fig. 9), a predominant source of contrast in fMRI images. Though the effect of other sources is not negligible, (for instance, blood flow) it is still investigated by many researchers, and these sources contributions to the detected signal is debated. [5,9,10,16,17,19,21, & others] 13 Signal Intensity Stimulation “ OFF" {short T2*) Stimulation "ON" (Long T2*) Difference C Time Fig. 8: Change in T2* during functional activation in fMRI. Fig. 9: Blood Oxygenation Level Dependent (BOLD) effect. [NEXT PAGE], 14 B l ood O xygenat i on L evel D ependent ( BOLD) effect: PET: f t 30-50 % blood flow \ n*,.,homr.„iohirT f t 10 % blood volume f f t local Oxygen = ► f t ------ --------— -----r— f t 0-5 % Oxygen consumption ] j j Deonyhemoglobin I I P ro to n S p e d .: f t lactate } f t anaerobic Glycolysis I PET FDG: f t Glucose consumption j The relative decrease in Deoxyhemoglobin (paramagnetic) i decrease in transverse spin-dephasing of nuclei i longer T2* 4 increase in T2* weighted image intensity 4.1 METHODS OF fMRI SIGNAL PROCESSING: [1/ 3,4, & 13] fMRI does not yield an absolute measure of blood flow or volume, rather a relative change in signal intensity; therefore methods for extracting functional information are required. Those methods should be objective, reproducible, and meet acceptable standards of statistical significance. Among these Techniques are: subtraction, Fourier analysis, correlation, student t test, least-squares analysis, and principal-component analysis, as well as other techniques. This paper explains the practical combined implementation of two of them, though subjective (requires human interference to determine a threshold), yet provide reliable results. 4.1.1 Subtraction Technique: One of the basic concepts in image processing is image difference. If you had two images of the exact same scene, the result of subtracting one from another is (should be) zero. Assuming we had something in one image that did not exist in the other, the result of subtracting the last from the first is the difference itself, i.e., only the new structure which was introduced to the scene (fig. 10). The classical example is an image of an empty street, and another for the same street (taking from the same angle), only with traffic; the resulting difference image would be the traffic itself without any background. 16 f M RI, Im age D iflet ence Techni que: The co n cep t: Fig. 10: The concept of image difference. Let’ s start by saying that this idea is the basis for fMRI. The steps, then, for a basic fMRI brain study would be: • Define the area of interest in the brain. • Take an MRI image such that it includes most of this area. • Apply the stimulus which is expected to activate this area. • Take another MRI image (during stimulation), with the exact same parameters used for the first image. • Subtract image # 1 (stimulus-OFF) from image # 2 (stimulus-ON), this is your fMR image. This is the most simple procedure, which is not practical. In practice, the stimulus is introduced for a longer time, enough to acquire several images, and the same number of images are acquired for a non-stimulus equivalent time. Also, this period of stimulus-ON and stimulus-OFF is repeated several times. It is customary to consider the first stimulus-OFF images as control images, and to start, afterwards, the acquisition of stimulus-ON, stimulus- 17 OFF, stimulus-ON, stimulus-OFF,...etc... for the desired periods. This provides consistency and statistical validity, and allows implementing other types of image processing techniques. Before going into details about other techniques, let's redefine the difference image for our new set of data: Difference im age = average { all (stimulus-ON) images} - average { all (stimulus-OFF) im ages) by the way, this averaging, by itself, is a random-noise reduction process. 4.1,2 Cross-Correlation Thresholding Technique: It is feasible to imagine the behavior of the activated pixels intensities as a pulse wave; since, for each pixel, the intensity is increasing during stimulation, and decreasing otherwise, the expected intensity vs. time plot (the time course), should look simply like a train of pulses. This holds, but to a certain extent, because living tissues don't have, usually, the characteristics of linear and sudden responses. So, what would we get after "smoothing" a train of pulses? A sinusoidal, more like a sine wave (fig. 11 shows an example of an actual pixel's time course). And this is the basis for sine-correlation analysis in fMRI, cross-correlating the time series of each pixel with a sine wave (defined for the same periods of stimulus-ON, stimulus-OFF images). 18 The linear correlation coefficients are computed as follow: X [ ( x ,- x ) .( j;- y ) ] /■I_______________________ £ (x ,-x )\lt(y < -n 2 i-i V m where Xi = Time ccourse of the pixel Yi = Reference signal (sinusoidal) n = Total number of ON and OFF images Amazingly, the "stimulus-OFF images" do not reflect the return of the pixels intensities to their base (initial) values, rather, an undershot takes place, as if the tissues were "resting" after a "tiring" stimulus-ON phase. A fact not well -understood yet, but perfectly validates the sine cross-correlation analysis. The time course of pixel [204,118] in Plane 1 of LA022296 200 •a 100 P « if, 50 ooooo ooooo ooooo ooooo ooooo ooooo e -50 M 40 Image number. Fig. 11: An example of an actual pixel's time course; (*) correspond to ON, (o) to OFF, and the correlation sine & cosine functions (dotted) [All scaled for clarity]. So, for each pixel: A cross-correlation value of zero means no correlation, i.e., not activated. 19 A cross-correlation value of one means high correlation, i.e., highly activated. And all values of cross-correlation in-between correspond to different levels of correlation and therefore activation. Even though the sine cross-correlation analysis is used in fMRI, one can argue: what made us restrict ourselves to "best-fitting" a sinusoidal to a sine wave? A valid argument, and point well taking by many MRI researchers, the new trend is to find the cosine cross-correlation as well and consider both sine & cosine in processing. [6, & 19 for example] The processing, then, takes into consideration both sine and cosine cross-correlation information (images), our approach is to consider their normalized magnitude (to standardize the results of any experiment(s)): Rm = + R j where 1 ^ = magnitude of correlation = sine correlation coefficients = cosine correlation coefficients So, we end up with sine and cosine cross-correlation information, as well as their magnitude (the above modulus), three sets of data, which are usually kept as three matrices (three images), to reserve the spatial locations (the corresponding coordinates). Since all pixels have certain sine, cosine, and modulus cross-correlation values, thresholding is required to isolate the "functional" pixels from the "not so functional" or noise-originated pixels, a process which, obviously, sacrifices some pixels (fig. 21) that might be of functional origin, but, would be minimized when combined with other image processing techniques. 20 4.1.3 Combining Subtraction & Cross-Correlation: The idea is to combine the two techniques to enhance the chances of well-defining the activated pixels, as well as scaling the intensities of the resulting defined pixels. The principle is to locate the activated pixels from the modulus, and sine, cross-correlation coefficients, and scale these pixels' intensities from the difference image information; interactively, such that, our human interference w ouldn't be based on one on the expense of the other. The practical implemetation will follow in detail in 4.3.1. 4.2 fMRI DATA ACQUISITION: Using a Phillips Gyroscan whole body MRI system (1.5 T), the procedure to acquire visual cortex fMRI data for this project was done in the following manner: • To provide binocular visual stimulus, we have used a strobe light flashing at 8 Hz on a checker board pattern placed in front of the subject. • Head fixation was achieved by strongly fitting foam pads. • Head coil was used to scan the brain. • Tl-weighted multiscan sagital images of whole head were acquired, to locate the expected brain area of activation, in our case, 5 planes bracketing the calcarine fissure were chosen (fig. 12). • Using Fast Field Echo (FFE) pulse sequence, which is a gradient echo pulse sequence developed by Phillips Medical Systems, several ON and OFF images were acquired for each plane in the following sequence: 21 Control ON OFF ON OFF ON OFF ON OFF ON OFF ON OFF 4 5 5 5 5 5 5 5 5 5 5 5 5, the images were 128x256 (interpolated afterwards to 256x256), with TR=53 ms, TE=45 ms, 5 mm thickness. Fig. 12 Sagital slice showing the choice of 5 functional planes(l:higher 5:lower). • Using spin echo pulse sequence, the anatomical images of the same planes were acquired. The resulting data for reach image would be a 16-bit binary file of size 256*256*2bytes = 131072 bytes minimum, because usually, each file has few lines of string-headers (16-bit as well). 22 4.3 PROCEDURE OF FMRI DATA PROCESSING: Our data is the gradient-echo images for a certain plane, and the processing algorithm includes finding: the difference image, the sine cross correlation image, and the cosine cross-correlation image, and displaying the results for an interactively-variable cross-correlation threshold. 4.3.1 Processing Algorithm: The processing algorithm (for a given plane): • Read all gradient-echo image files. • Find the difference image. • Generate a sine signal for the period of (ON, and OFF images), for the length of all images (except control images). • Generate a cosine signal for the same parameters of sine above. • Find the linear sine cross-correlation coefficients for each pixel's time course. • Find the linear cosine cross-correlation coefficients for each pixel's time course. • Find the modulus of sine and cosine correlation coefficients, then normalize it. For all previous processes save the result in matrix format for addresses corresponding to the same anatomical pixel-addressing. • Find: LOCATIONS (of fMRI pixels) = {modulus >= threshold) 23 AND { sine cross-correlation coefficients > zero}, intensities of pixels (at LOCATIONS) = normalize} difference image (at LOCATIONS)}. • Initial values: min(gray scale)=0. max(color scale)=255. MAX_GRAY_SCALE =200. • Make: pseudo-color scale = { MAX_GRAY_SCALE +1} to {max(color scale)}. fMRI pixels = pseudo-color scale * normalized intensities of pixels. • Display: Anatomical image (in gray scale) AND fMRI pixels ( in pseudo-color scale). • Create SLIDERS for: MAX_GRAY_SCALE. GRAY_SCALE_ANATOMICAL_CLIPPING. COLOR_SCALE_FMRI_CLIPPING. MODULUS_THRESHOLD. • Process: * For ANY SLIDER click: - Update all related parameters and variables. - Re-display. - Save the current displayed image in a temporary matrix. - Save the current color index ( gray scale AND color scale ) as 24 a temporary RGB matrix (size 256x3). - If (MODULUS.THRESHOLD = clicked) then: Make threshold value part of the output file name, end if. * For any SAVE CURRENT IMAGE options: - image to save = temporary image matrix. - RGB colormap to save = temporary RGB matrix. - Format values of matrices to suit SAVE option. - Write to a new binary file ( with name derived from original anatomical image AND current threshold value). 25 4.3.2 Implementing The Processing Algorithm: (A fM R I Interactive Image Processing Tool Using MATLAB® Programming) MATLAB® [23] is an academically widely used, high-performance numeric computation and visualization software. Just like any other software, it requires the proper knowledge in order to appreciate its performance. Although MATLAB has a programming language which could be easily viewed as FORTRAN or C like-language, this couldn't be farther from the facts. MATLAB language has to be thought of as "slightly higher" than a low level programming language. This fact can’ t be seen for small tasks which don't require extensive computations, but easily detected for bigger tasks which run extremely slow if the programming scripts were not the appropriate ones. The prescribed algorithm, for fMRI processing, is implemented in four MATLAB m-files, taking advantage of several intrinsic mathematical functions, and most of the display capabilities, including pull-down menus, and interactive sliders. The program ru n f MRI (fig. 13), was written to properly read the data from different sources (three hospitals using different MRI machines so fare), as well as any data generated (for fMRI purposes) by other programs. The difficulty was implementing an interactive fMRI processing software, lacking the MATLAB IMAGE PROCESSING TOOLBOX, which is unavailable in many academic institutions for educational purposes. 26 Fig.13 The whole interactive control window, displaying plane#l processed image. 27 5. THE runfMRI "SOFTWARE" DESCRIPTION, AND USAGE: After invoking MATLAB, the user can run the program by typing the name of the first file (ru n f m r i), then a window (fig. 13), will appear with a top menu; everything afterwards is completely interactive. There are four menu options (fig. 14): PROCESS, SAVE, HARDCOPY, and EXIT. Fig. 14 Menu options, Colors, and Cropping. • PROCESS has three options: 1) Processing raw-data image files (i.e., the original data): When chosen the user will be asked, (through another window) to click on the anatomical file, then any (as long as it belongs to the same plane) gradient- echo file. A small anatomical image will appear for confirmation, and reading gradient-echo files will start with a small progress bar (fig. 15), this should be 28 done within 2 minutes (on SPARC 4 or 5 Sunm stations), then, after a brief message of the exact elapsed time, the processing of sine and cosine cross correlation coefficients (also a 2 minutes process) will start, with progress bar, and time message when done (fig. 16). G6.ani Fig. 15 The window while processing, the reading progress bar. 29 Fig. 16 The processing progress bar. The final fMRI image will be displayed for some initial default parameters (gray scale clipping of anatomical image for upper 20% of number of pixels, correlation-coefficient threshold of 0.6, maximum gray scale of 200); all of which are interactively slider-controllable. The user can change the sliders to create the desirable image parameters. This option saves, automatically, seven files: anatomical, average-ON, average-OFF, difference, sine-correlation, cosine-correlation, and modulus, in binary format , without headers, for future references, and re-creating the image for any other parameters by using option (2). 2) Processing pre-processed data-files: this options could be used provided the previous option (1) have been implemented at an earlier time and the seven pre-processed files are available, here the user chooses only the anatomical file from the pop-up window and the image will be displayed within few seconds. 3) This option is for displaying saved images (in raw-unclipped binary image format). • SAVE: three options for saving the final image: 1) raw-unclipped binary image format 8-bit. 30 2) raw-unclipped binary image format 16-bit. 3) TIFF image format ( color-index or gray scale, uncompressed, lab. & time tagged, with clipping option). Recently implemented in the program; as an effort to employ a media-independent image format. Most UNIX, MAC, and PC softwares accept TIFF images created by choosing this option. • HARDCOPY: three options for a hardcopy of the window (without the sliders): 1) B & W Post-Script. 2) Color Post-Script. 3) 8-bit Gif. • EXIT: two options: 1) Exit the program, clear all variables, return to MATLAB shell. 1) Exit MATLAB, and return to UNIX shell. User Interactive Controls: • The Color-map Sliders (fig. 17): The image is created and scaled for a Color-map range of: 0 to 255, where a maximum gray scale threshold is defined for separating the anatomical image (ranged from: 0 to maximum gray scale), and the superimposed fMRI defined pixels (ranged from: { maximum gray scale +1} to 255). The threshold of separation itself is controllable by a smaller slider to the right of the two big sliders. 31 Fig. 17 The Color-map Sliders Clicking on any of these sliders would adjust all other related parameters, and re-display the image for the current setting. A small window displays the initial gray scale clipping for anatomical image ( found from the intensity at threshold of upper 20% pixels by computing the cumulative histogram ), and updates this value if the small scaling slider were clicked; this window is just a reminder. The anatomical image gray scale clipping is implemented to clarify the white and gray matter, since, most MRI images look very dimmed (dark) due to fat distribution outside the brain. • The Correlation Coefficient Threshold Slider (fig. 18): This would locate the pixels' addresses for all pixels above the chosen Modulus threshold (with sine cross-correlation coefficients above zero), and rescale these pixels' intensities (from the difference image information) to re display the image for the current Color- map setting. * The Cropping buttons (fig. 14): Work just like any image processing software cropping utility, for cropping and un-cropping using the mouse: place the mouse anywhere on the image, click, put the new generated "cross-hair" anywhere, click, you create two crossed lines at this location, move it, click, you create new two lines, defining the rectangle of a new image size, push "crop" to activate, or, start defining new rectangle (a double click will clear the first four lines (fig. 13)). 33 Num ber of activated pixels = 117 Fig. 18 The Correlation Coefficient Threshold Slider • The Number of activated pixels window (fig. 18): A simple display of the number of fMRI pixels (updated if the image were cropped), • Color-map buttons (fig. 14): Three settings for this, where the anatomical image is always in gray scale, and the fMRI having the following three options: 1) White: for B & W printing: The anatomical image should be dimmed (using the small scale slider) to emphasize the fMRI pixels, if a noticeable separation is sought. Also the "whiteness" could be left as the upper gray scale, or clipped (using the minimum position of the color scale clipping slider) to 34 make all fMRI pixels one white color (the options I've chosen to save some images for this project). 2) Red: For Two-colors only printers; same as option (1), except that fMRI pixels are red colored, here no need to dim the anatomical image. 3) Indexed-Color for a pseudocolor scale (blue gradually to red for fMRI pixels), which is the most used option for our experiments, and the most helpful one in controlling the threshold, since the color scale adds new and valuable input. 5.1 Applying "runfM R I": The next three pages illustrate using the program to get the results of the experiment described in "fMRI DATA ACQUISITION". Plane 1 is explored to display the anatomical image (fig. 19), as well as the first (out of 64) functional (gradient-echo) image (fig. 20), both for the original unclipped size of 256x256 pixels, and a moderate gray scale clipping (otherwise they would be very dimmed). Next, there is a display of different thresholding effect (Fig. 21), for too low, too high, and a moderate threshold, respectively, applied to a "clipped" plane 1. Finally, the last figure page (fig. 22), displays the final clipped fMR images of plane 2 through 5. Again anatomy is displayed in a dimmed gray scale, functional in bright white, the best option for B & W printing. 35 Fig.19 The 256x256 pixels anatomical (spin-echo) image of plane#!. Fig. 20 The 256x256 pixels first functional (gradient-echo) image of plane#! (total=64). Th = 0.2725. Th = 0.8683. Th = 0.5299. Fig. 21 The fMRI image of plane#l, different thresholding effect. 37 i < . : \ ■ i r ;W • planes#2 planes#3 planes#4 planes#5 Fig. 22 The final fMRI images of planes: 2, through 5. 38 6. CONCLUSION The rapid evolution of Magnetic Resonance Imaging is refining its techniques and applications in a monthly, even weekly basis. The question has gone far beyond "can we image an organism?", it is hovering now over the ultimate wonder of preventive medicine: "can we image the very early functional changes w ithin an organism?". And, just like the many technological evolution's that flooded our daily lives during the past few decades, the answer is closer than we think. Actually, it has been achieved, but, not to the expectations of our civilization; what has been done is not as safe as the plain MRI. Invasive procedures, and radiation doses, don't sound tempting to any of us nowadays. fMRI the unique candidate for this task, is in constant evolution. And the aim of this research project was a modest step towards implementing an integrated, user friendly processing tool for fMRI experiments. Although, objective achieved, it's no more than an engineering task, done for the time being. Updating should be performed (and is, actually, performed), at the rate of fMRI growth, monthly, even weekly. It w on't be long before we can visit a site on the World Wide Web, where we can, within seconds, do the processing for our set of fMRI data; the issue won't be "can we do it fast and interactively?", it will be "how can we interpret this fMR image?". 39 7. THE COMPLETE LISTING OF MATLAB™ FILES • FIRST PROGRAM: % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % _______________ Louai Al-Dayeh E-Mail: louai@bmsrs.usc.edu / / / BioMedical Engineering Dept. (BME) University of Southern California % % /////_// % / / t A \/ / % / / _ / / ______/ I / ___ % \ A _A / % BIOMEDICAL ENGINEERING % | % % % IMAGE PROCESSING / fMRI: FUNCTIONAL MAGNETIC RESONANCE IMAGING % BME Research, Dr. Manbir Singh's lab. % MATLAB program File name: runfMRI.m Date: Apr.19.95 % % *THIS PROGRAM SETS THE PARAMETERS FOR runfMRl2.m -> runfMRl4.m FILES* % % clear all; bll=str2mat(' ',• INTERACTIVE IMAGE PROCESSING:',1 ',' PROCESS ' Three processes can be done, choose one with the mouse.1,' ',' SAVE ' This option works for processes 1 & 2, for saving the processed image',... 1 as a binary file {either 8 or 16 bits).',’ '); bl2=str2mat(' HARDCOPY: ' This option works for all processes, for saving what you see in the',... ’ window (except for the sliders & controls) as a Giffer file or as a',... ' PostScript file (whether Gray Scale or Color).',■ ',' EXIT:',... * To quit this program & return to Matlab, or quit both & return to UNIX. ' ',' Louai Al-Dayeh, BME Dept., USC.'); % % SZ=256; gray_clip=100; color_clip=254; MX_G_LVL=20 0; MN_C_LVL=MX_G_LVL+1; new_rat=l; wor_dir=pwd; clr_mp_s=['clr_g*gray(256)+',... 'clr_c*[gray(MN„C_LVL);jet(256-MN_C_LVL)]+',... 'clr_r*[gray(MN_C_LVL)jones(256-MN_C_LVL,1)*[1 0 0]]']; clr_g=0; clr_c=l; clr_r=0; clr_mp=eval(clr_mp_s); clr_sta='setstr([95 [71 82 67]*[clr_g==l;clr_r==l;clr_c==l]])'; clr_xt=eval(clr_sta); prcs_all='disp(''processing fMRI''}'; colormap(clr_mp); global SZ gray_clip color_clip MX_G_LVL MN_C_LVL clr_g clr_r clr„c clr_mp; h_l=figure(l); set(h_l,'Position*,[0 100 620 802],'Name'. 'INTERACTIVE IMAGE PROCESSING; Louai Al-Dayeh. B.M.E. Dept.,USC.'); 40 dPdPdPcfPdPdP d P 4 P *> d P d P 4 P d P L_B=uimenu(h_l,'Label‘,' PROCESS '); B_l=uimenu(L_B,'Label',*1. Process raw data fMRI files',. .. •Callback','D0=1; prcs=''raw fMRI' 1 ;runfMRI2■) , * B„2=uimenu(L_B,'Label’, '2. Process pre-processed image files', ... •Callback','DO=2; prcs=''pre processed images'•;runfMRl3'); B_3=uimenu(L_B,'Label','3. Display image files*,.. . 'Callback*,'DO=3; prcs=*'Display images'';'); b_l=uimenu(B_3,'Label','1 Image per page','Callback',1disp_N=l;runfMRI4'); b_2=uimenu{B_3,'Label','2 Images per page*,'Callback','disp_N=2;runfMRI4') b_3=uimenu(B_3,'Label','3 Images per page', 'Callback*,'disp_jl=3 j runfMRl4‘) b_4=uimenu(B_3,'Label', ' 4 Images per page','Callback','disp^N=4;runfMRl4') b_5=uimenu(B_3,'Label','5 Images per page','Callback','disp_fl=5;runfMRl4') b_6=uimenu(B_3,'Label', '6 images per page','Callback','disp„M=6;runfMRl4’) L_A=uimenu(h_l,'Label',' SAVE •}; A_l=uimenu(L_A,'Label','1. Save current image as raw 16bit binary file'); A_2=uimenu(L_A,'Label','2. Save current image as raw 8bit binary file'); A_3=uimenu(L_A,'Label','3. Save current image as TIFF image file'); L_P=uimenu(h_l,'Label',' HARDCOPY '); P_l=uimenu(L_P,'Label','Print B&W PostScript file'); F_2=uimenu(L_P,'Label','Print Color PostScript file'); P_3=uimenu(L_P,'Label','Print GIF file'); L_D=uimenu(h_l,'Label',' EXIT •}; D_l=uimenu(L_D,'Label','Exit Program Only',•.. 'Callback','clear all;clf;set(gcf,''Vis'’,''off*’);'); D_2=uimenu(L_D,'Label','Exit Prog. & Matlab','Callback','exit'); LTP=[250 20 120 20);LTb=[.8 .0 .5); L_T=uicontrol(h_l,'Style','slider','Position',LTp,’Visib','off',... 'Min',.01,'Max',1,'Value*,.6,'CallBack',['set(T_4,''String' 'num2str(get(L_T,''Val''))),',... 'Thrld = get(L_T,''Val'');',... 'evaltprcs_all)'],•Backg',LTb); T_l=uicontrol(h_l,'Style','text','Pos',LTp+[-20 0 -100 0],'Visib',' o f f , • String','0', 'Backg',LTb); T_2=uicontrol(h_l,'Style',1 text','Pos',LTp+[120 0 -100 0],'Visib','o f f . ■ String',num2str(get(L_T,'Max')),'Backg',LTb); T_3=uicontrol(h_l,'Style*,'text*,'Visib','off,'Backg',LTb,... 'Pos',LTp+[-12 50 28 0],'String','Corr, Coeff. Threshold'); T_4=uicontrol(h_l,'Style‘,'text','Visib','off','Backg',LTb,... 'Pos'.LTP+[35 22 -70 0],'String',num2str(get(L_T,'Value'))); LCp=[582 446 20 120); L_V=uicontrol(h_l,'Style','slider','Position',LCp+[24 -50 -8 -60],... •Visib','off','Backg*,t.3 0 0],'Min',127,'Max',247,'Value',MX_G_LVL,... 'CallBack',[... 'gray_clip=round((gray_clip*round(get <L_V,''Val'')))/MX_G_LVL) 'MX_G_LVL=round(get(L_V,•'Val''));',... 'color_clip=round(get(L_V,''Val''))+l+round(((color_clip- MN_C_LVL)',... '*(254-{round(get(L_V,■'Val''))+!)))/(254-MN_C_LVL));',... 'MN_C_LVL=round(get(L_V,'•Val‘'))+1;',... ■set(L_G,''Max'',MX_G_LVL,''Val'',gray_clip) 'set(L_C,''Min'',MN_C_LVL,''Val'',color_clip) •set(C_l,''Str'',int2str(MN_C_LVL));,',... *set(G_2,''Str*',int2str(MX_G_LVL));,',... •set(G„8,''Str'',int2str(round(gray_clip_l*MX_G_LVL/max_AF)));,',.,. 'set(C_5,''Str'',int2str(color_clip));,',... 'eval(prcs_gray),','eval(prcs_all) 'clr_mp=eval(clr_mp_s);colormap(clr_mp);')); L_C=uicontrol(h_l,'Style','slider','Position*,LCp,'Backg',[.2 1 .2],... 41 'Visib','off1,'Min*.round(get(L_V,'Val'))+l,'Max',254,... 'Value',254,'CallBack',[*set(C_5,1•String' 'int2str(get(L_C,''Val''))),',... 'color_clip = get(L_C,''Val'eval(prcs_all)']J; C_l=uicontrol(h_l,'Style','text','Pos',LCp+[-2 -20 4 -100],'Visib',‘off*,.,. 'String',num2str(get(L_C,'Min')},'Backg’,[.3 .3 1]); C_2=uicontrol(h_l,'Style','text','Pos',lx:p+[-2 120 4 -100],'Visib',' o f f . ' String', num2str (get (L_C, 'Max')), 'Backg*, [1 .3 .3]),* C_3=uicontrol(h_l,'Style*,'text','Backg',[1 .3 .3],'Visib','off',... 'Pos',LCp+[-14 188 28 -100],'String','Color*); C_4=uicontrol(h_l,'Style','text','Backg',(.3 .3 1],'Visib',’off',.,, ■Pos',LCp+(-14 168 28 -100],'String','clipping*); C_5=uicontrol(h_l,'Style','text','Visib','off','Backg*,(.2 1 .2],... 'Pos',LCp+[-4 146 10 -100],'String*,int2str(get(L_C,'Value'))); L_G=uicontrol(h_l,'Style','slider','Positi',LCp+[0 -160 0 0],'Visib','off',... ■Min',0,'Max',MX_G_LVL,'Value',gray_clip); G„l:=uicontrol(h_l,'Style','text','Pos', LCp+[-2 -180 4 - 100],'Visib','off *,... 'String',num2str(get(L_G,'Min') )) ; G_2=uicontrol(h_l,'Style','text','Pos*,LCp+[-2 -40 4 -100],'Visib',' o f f . 'String',num2str(get(L_G,'Max') ) > ; G_3=uicontrol(h_l, 'Style','text•,'visib','off',... •POS',LCp+[-14 -204 28 -100],'String','Gray S'); G„4=uicontrol(h_l,'style','text','Visib','off', ... •Pos*,LCp+[-14 -224 28 -100],'String','clipping'}; G_5=uicontrol(h_l,'Style','text','Visib','off','Pos',LCp+[-4 -246 10 -100]); G_6=uicontrol(h_l,'Style','text','Pos',I£p+[-92 -310 104 -100],... 'visib','off','String','INITIAL clipping for'); G_7=uicontrol(h_l,'Style','text*,'Pos',LCp+[-92 -330 104 -100],... 'Visib','off','String','upper 2% of pixels'); G_8=uicontrol(h„l,'Style','text*,'Pos',LCp+[-42 -352 4 -100],'Visib','off’); G_9=uicontrol(h_l,'Style','text','Pos‘,LCp+[-420 -310 170 -1003,... •Visib','off','String*,('Number of activated pixels ='],... •Backg',[1 1 1],'Foreg',[0 0 0]); G_10=uicontrol(h_l,'Style','text','Pos',LCp+(-230 -310 24 -100],... •Visib*,'off','Backg',[1 1 1],'Foreg',[1 0 0]); sr_p=[120 700 64 20]; set_noc=uicontrol(h_l,'Style*,'push','Pos',sr_p+[0 30 0 0],... 'Visib','off','String', 'Un-Crop','Backg',[1 0 1],... 'CallBack','x_crp=l:img_W;y_crp=l:img_L;eval(prcs_all)'); set„cut=uicontrol(h_l,* Style','push*,'Pos',sr_p,'Visib','off' 'String','Crop','Backg',[0 1 1],'CallBack',... ['if existf''CRS1''),eval(h_crp);eval(prcs_all);end;']); Zlp=[59 700 500 20]; Z_l=uicontrol(h_l,'Pos',Zlp,•String',bll(1,:)); Z_2=uicontrol|h_l,'Pos*,Zlp+[0 -20 0 0],'String',bll(2,;)}, Z_3=uicontrol(h_l,'Pos',zlp+(0 -40 0 0],'String',bll(3,:)) Z_4=uicontrol(h_l,'Pos',Zlp+[0 -60 0 0],'String',bll(4,;)) Z_5=uicontrol(h_l,'Pos',Zlp+[0 -80 0 0],'String',bll(5,:)j z_6=uicontrol(h_l,'Pos',Zlp+[0 -100 0 0],'String',bll(6,;)) Z_7=uicontrol(h_l,'Pos',Zlp+[0 -120 0 0],'String',bll(7,;)) Z_8=uicontrol(h_l,'Pos',Zlp+[0 -140 0 0],'String',bll(8,;)) Z_9=uicontrol(h„l,'Pos',Zlp+[0 -160 0 0],'String',bll(9,:)) Z_10=uicontrol(h_l,'Pos',Zlp+[0 -180 0 0],'String',bll(10,:}>; z_ll=uicontrol(h_l,'Pos',Zlp+[0 -200 0 0],'String',bl2(1, :)); Z_12=uicontrol(h_l,'Pos',Zlp+[0 -220 0 0],'String',bl2(2,:)) Z_13=uicontrol(h_l,'Pos',Zlp+[0 -240 0 0],'String',bl2(3,:)) Z_14=uicontrol(h„l. *Pos',Zlp+[0 -260 0 0],'String',bl2(4, :)) 42 Z_15=uicontrol(h_l,'Pos*,Zlp+[0 -280 0 0],'String',bl2(5,: Z_16=uicontrol(h_l,'Pos',zlp+[0 -300 0 0 ] String',bl2(6,: Z_17=uicontrol(h_l,'Pos',Zlp+[0 -320 0 0], ’String',bl2{7, Z_18=uicontrol(hj., 'Pos', Zip-*-[0 -340 0 0],'String* ,bl2(8, : Z_19=uicontrol(h_l,'Pos',Zlp+[0 -360 0 0], 'String',bl2(9,:] ZZZ=[Z_1,Z_2,Z_3,Z_4,Z_S,Z_6,Z_7,Z_B,Z_9,... Z_10,Z_ll,Z_12, Z_13,Z_14,Z_15,Z_16,Z_17,Z_18,Z_19]; set(zzz,'Style','text','Backg',[0 0 1],'Foreg’,[1 1 1],'Hori','left'); set (z_2, 'Backg*, [0 0 1] , 'Foreg' , [1 0 0]) ; set(Z_19,'Backg', [0 0 1],'Foreg',[1 1 0]); sett[Z„4,Z_7,Z_11,Z_16],'Backg',[0 0 1],'Foreg*,[0 1 01); sr_p=[4 700 84 20]; set_red=uicontrol(h_l,'Style','radio','Pos*,sr_p,'Visib','off',... 'String','Red,Gray','Backg',[1 0 0],... 'CallBack', [ 'clr_g=0;clr_c=0;clr_r=l;clr_xt=eval(clr_sta) 'clr_mp=eval(clr_mp_s);colormap(clr_mp) • set([set_colors,set_gray],''Val' ', 0) ']); set_colors=uicontrol(h_l,'Style','radio','Pos*,sr_p+[0 20 0 0],'Val',l,— •Visib','off'String','Color','Backg',[1 1 0],... 'CallBack',['clr_g=0;clr_c=l;clr_r=0;clr_xt=eval(clr_sta) 'clr_mp=eval(clr_mp_s);colorroap(clr_mp);',... 'sett [set_red,set_gray],''Val'',0)*]); set_gray=uicontrol(h_l,'Style',‘radio','Pos',sr_p+[0400 0],'Visib','off*, ... •String','Gray S','Backg',t.4 .4 .4],... 'CallBack',['clr_g=l;clr_c=0;clr_r=0;clr_xt=eval(clr_sta);',... *clr_mp=eval(clr_mp_s);colormap(clrjnp) •sett[set_colors, set_red],''Val'',0)']); ALL_S=[L_V,L_T,T_1,T_2,T_3,T_4,L_G,G_1,G_2,G_3,G_4,G_5,G_6,G_7,G_8,G_9,G_10. L_C,C_1,C_2,C_3,C_4,c_5,set_red,set_colors,set_gray,set_cut,set_noc]; % % ht= ['settget(gca,''Title''],''FontName'',''Times'',''FontAngle' '''italic'',''FontWeight'',''bold'',''FontSize'', [14])’]; hx=['set(get(gca,''XLabel'* J,•'FontName■•,''Times ■ *'FontWeight'',''bold'•,•'FontSize'',[12])']; hy= ['set(get(gca,''YLabel''),''FontName'',''Times'',''FontAngle' ■•'italic•',''FontSize'',[10])']; he=['h_3=gca;',... 'set(get(h_3,''Title''),''FontName'',''Times’’,''FontSize'',[14],',.. '''FontWeight'',''bold'',''Color'',[1 0 0])']; he3=['h_3=gca;set(h_3,''Position'',[.08 .22 .64*(802/620) .64]);',... 'set(get(h_3,''Title'‘),*'FontName'•,''Times’•,''FontSize'', [14],',,. '*'FontWeight'',''bold'',''Color'',[1 0 0])']; he2=['h„3=gca;set(h_3,''AspectRa'',[1 1],'*Posit'',[.11 .16 .74 .74],',... •''XTickLabels'',£],' 'YTick Labels ",[]);']; P_c_s=[ 117 105 110 116 56 ,-115 104 111 114 116; 115 104 111 114 116;102 108 111 97 116]; archi_s=[110;110;108;110]; b_z_n=[SZA2;2 *SZA2;2*SZA2;4*SZA2]; file_status=['[nothing,B_sz]=unix([''wc -c •' in_f]);l_e=findstr(B_sz,32);',... 'r_l=str2num(B_sz(l_e(length(l_e)-l)+l:l_e(length(l_e))-l));',... 'b_f_s = [r_l==SZA2;r_l==2*SZA2;r_l>2*SZA2 & r_l<4*SZA2;r_l==4*SZA2] ■p_c=setstr((p_c_s''*b_f_s)*');if strcmp(a_ext,''.HR''),archi=''n*. 'else,archi=setstr((archi„s''*b_f_s)'');endr',... 'b_z =(b_z_n''*b_f_s)'';h_z=r_l-b_z;']; 43 bin_R = [’[fid,msg]=fopen(in_f,•‘r1', a r c h i ) . ■if fid==-l,disp(msg).return,end;',... ■f_status = fseek(fid,-b_z,'' e o f . ■[FF,count_f]=fread{fid,inf,p_c);fclose(fid);1]; bin_W = ['[fidw,msgw]=£open(file_w,1'w‘')j1,... ’if fidw==-l,disp(msgw);end;*,... • fwrite (f idw, bin_im, p„c_w); fclose (f idw) , * ' ] ; % % % % % % End of First Pr ogram % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 44 dp «JP • SECOND PROGRAM: % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % MATLAB program File name: runfMRl2.m Date: Apr.19.95 % % *** THIS PROGRAM PROCESSES RAW DATA £MRI IMAGE FILES *** % % % % % w w v w v w v w v w PROCESSING PARAMETERS: CTRL_imgs=4; % Number of control images. s=5; % Number o£ one-cycle "ON" images (= Numb, of "OFF" ). N=40; % Number of {{ALL} "ON"+"OFF" images }. %a a a a a a a a a a a a a a a a PROCESSING PARAMETERS: set(h_l,'Color*,[0 0 0]J; set( {ZZZ,ALL_S] , 'Visib', 'off'),- set{L_T, 'Val*, .5); set(T_4, 'Str', '0.6') ; ff5=subplot(1,1,1J;ff6=image(zeros(10J);set([f£5,£f6],'Visi','off•)j empty_c=zeros (SZ^, 1) ; [a_n,a_p]=uigetfile(**.*','Choose the anatomical file for this plane*,99,99); root_s=a_p(length{wor_dir)+l+findstr(a_p,wor_dir):length(a_p)); if root_s==* *,root_s=a_n;end; int_indx=find{ (root_s>=40 & root_s<=57) | ... {root_s>=65 & root_s<=90) | ... (root_s>=97 & root_s<=122)); str3=root_s(int_indx) , * in_f=[a_p a_n]; (a_name,a_ext] =strtofc(in_f,46) ; eval{£ile_status) , * FF=empty_c; eval (bin_R) ; if ~[strcmp{a_n,'tmp.ana*)], file_w=[a_p 'tmp.ana'];bin_im=FF;p_c_w=‘short';prmtn=*w*;eval(bin_W);end; AF=FFfAF=AF-rnin{AF); max_AF=max(AF) ; [lo_n,lo_x]=hist(AF); all_n=cumsum(lo_n); limitF=0.98* (SZ^J ; gray_clip_l=ceil(min{lo_x(all_n>=limitF))); gray_clip=round(gray_clip_l*MX_G_LVL/max_AF); set(G_8,'String■,int2str(gray_clip)); set(L_G,'Value',gray_clip); E_E=empty_c; ^Normalized: AF=AF/max_AF; norm_g„c=gray_clip_l /max_AF , * prcs_gray=[... 'norm_g_c=gray_clip/MX_G_LVL;E_E=round(',... ‘(MX_G_LVL/norm_g_c)*{AF.*(AF<=norm_g_c)+norm_g_c*(AF>norm_g_c)));',... ■E_E=reshape (E_E, SZ, SZ , 'set(G„5,''String'',int2str(round{get(L_G,''Val*'))));']; eval{prcs_gray); subplot{2,l,2) ;image(E_E'+1) ;axis off; axis equal; title('The anatomical image of this plane*);eval(ht); xlabelt['DIRECTORY: *' a_p File: a_n "*.']);eval(hx); pause(.1}j % % [f_n,f_p]=uiget£ile('*.*','Choose ANY fMRI file in this plane*, 99,99); int„indx=find(f_n>=4B & f_n<=57); int_indx=int_indx(length(int_indx)-1:length(int_indx)); wild_f=f_n; wild_f(int_indx) = {'*',* *•]; root_s=f_p(length(wor_dir)+l+findstr{f_p,wor_dir);length(f_p)); in_wild_f=[root_s wild_f]; 45 df> dP dP file_sta= [' [noth, BBB] =unix( [1 ' Is ' ' in_wild_f ] J ; • ] , * eval(file_sta); files_n_l=length(BBB); one_£_n_l=(length([root_s f_n])+1J; img_num=files_n_l/one_f_n_l; files_names=reshape(BBB,one_f_n_l,img_num)1; files_names(:,one_f_n_l) = U < FF_fMRI=zeros(SZA2,N)} in_f=files_names(1,:); eval(file_status); [f_name,f_N_ext]=strtok(£_n(46); set(Z_5,'Foreg', [0 1 0]),* set([Z_5,Z_6],'Hor*,'center','Visib','on'): set(Z_5,'string','** READING fHRI FILES: **•);pause(.1); in_f=£iles_names(l,:); eval(£ile_status); tl = clock: for indx=l:N in_£=files_names(indx+CTRL_imgs,:): eval (bin_R) , * set(Z_5,'Str',['** READING £MRI FILE: ' in_f * **']); set(z_6,'str*,setstr([62 62*ones(1,indx) ... 45*ones(l,N-(lndx)} 60])):pause(.1}; FF_fMRI(:,indx)=FF; end set(Z_5,'str',t'** READING DONE IN: ' num2str(etirae(clock,tl)160) ... • MINUTES **'])rpause(.l); v=l:N; v=reshape(v,s,N/s); nn=v(:,(l:2:N/s)); nn=nn(:)j nf=v(:,(2:2:N/s))j n£=n£(:); ON_R=zeros(l,SZA2); OF_R=ON_R; D R=ON_R; % % s_time=l/(4*s):1/(2*s):(N)/(2*s); S=sin(2*pi*s_time)'; c_time=(l/(4*s):1/(2*s):(N)/(2*s))-(1/(16*s)); C=cos(2*pi*c_time)'; CSC=zeros(1,SZA2); CS=CSC; CC=CSC: % - % seg_n=4*SZ; len_seg=(SZA2)/seg_n; x=zeros(N,len_seg); XS=x; XC=xr indx_orig=l:len_seg; % Sine: sumS=sum(S); sumS2=sum(S.A2); sum2S=sumS.A2; CoS=sumS2-(sum2S/N); SSS=S*ones(1,len_seg): % Cosine: sumC=sum(C); sumC2=sum(C.A2); sum2C=sumC.A2; CoC=sumC2-(sum2C/N); CCC=C*ones(l,len_seg); set(Z_5,'String','** PROCESSING SINE & COSINE CORRELATION COEFFICIENTS **'); pause(0.0001); cur_seg=l; t2=clock; while cur_seg<=seg_n; set(z_6,'str*,... setstr([62 62*ones(l,floor(32*cur_seg/seg_n)) ... 45*ones(l,32-floor(32*cur_seg/seg_n)) 60]));pause(0.0001); indx_div=(cur_seg-l)*(len_seg)+indx_orig: x=FF_£MRI(indx_div,:)'; ON„R(indx_div)=mean(x(nn,:)); OF_R(indx_div)=mean(x(nf,:)); sumX=sum(x); sumX2=sum(x.A2); sum2x=sumX.A2; Co2=sumX2-[sum2X/N); % Sine: XS=x.*SSS; sumXS=sum(XS); Col=sumXS-((sums*sumx)/N); Co4=sqrt(CoS*Co2); C_C_s_l=Col./Co4;Cor_Coef_sine=zeros(1,len_seg): 46 Cor_Coe£_sine(C_C_s_l>= -1 & C_C_s_l<=l)=C_C„s_l(C_C_s_l>= -1 & C_C_s_l<=l); CS(indx_div)=Cor_Coef_sine; % Cosine: XC=x.*CCC; sumXC=sum(XC); Col=SuraXC-({sumC* sumX)/N) ; Co4=sqrt(CoC*Co2); C„C_c_l=Col./Co4;Cor_Coe£_cosine=zeros(1,len„seg); Cor_Coef_cosine(C_C_c_l>= -1 & C_C_c_l<=l)=C_C_c_l<C_C_c_l>= -1 & C_C_c_l<=l); CC(indx_div)=Cor_Coef_cosine; % Sine & Cosine: Cor_Coe£_sine_cosine=sqrt(Cor_Coef_sine.A2+Cor_Coef_cosine. A2); CSC(indx_div)=Cor_Coef_sine_cosine; cur_seg=cur_seg+l; end set(Z_6,'string1,I'** CORRELATION COEFFICIENTS DONE IN: 1 ... num2str(etime(clock,t2)/60) ' MINUTES **' ]} ,-pause (0.0001); clear FF_fMRI; ON_R=round(ON_R); OF_R=round(OF_R); D_R=ON_R-OF„Rf CSC=(CSC-min(CSC))I (max(CSC)-min(CSC)); ON_R=ON_R1 ; 0F_R=0F_R * } D_R=D_R' , • CS=CS *; CC=CC1 : CSC=CSC ' ; prratn='w'; £ile_w=[a_p •tmp.diff'];bin_im=reshape(D_R,256,256);p_c_w=*short';eval(bin_W); file_w=(a_p •cmp.on1];bin„im=reshape(ON_R,256,256);p_c_w='short'jeval(bin_W); £ile_w=[a_p 'tmp.off'];bin_im=reshape(OF_R,256,256);p_c_w=‘short';eval(bin_VJ); file_w=[a_p 'tmp.mlcc'];bin_im=reshape(CSC,256,256);p_c_w=‘float'jeval(bin_W); file_w=[a_p 'tmp.slcc'3;bin_im=reshape(CS,256,256);p_c_w='float'jeval(bin_W)j file_w=[a_p ' tmp.clcc ’ ] ;bin_im=reshape (CC,256,256) ;p_c_w=' float' ,*eval (bin_W) ; % % Thrld=,6;subplot(1,1,1) ; img_W=SZjx_crp=l:img_Wj img_L=SZ;y_crp=l:img_L; BtDw=['if exist(''linel''),',... 'set([linel,Iine2,line3,line4],''Er*',''norm'',‘'Vis'',•'off* ')rend;',,,. •CRSl=ginput(1);CRS1=CRS1.*(CRS1>=[1 1) & , CRSl<=[img_W img_L]}+',... '((CRS1<[1 1J).*[1 1])+((CRSl>[img_W img_L]).*[img_W img_L]);',... •linel=line((CRSl(l) CRS1(1)],[1 img_L],''Er'’,''none'',''Vi'',''on*');',... •Iine2=line((1 img_W],[CRSl(2) CRS1(2)],''Er'',''none'•,''Vi'',''on''):',... ■CRS2=ginput(l);CRS2=CRS2.*(CRS2>=[1 1] & CRS2<=(img_W img_Lj)+',... '{(CRS2<[1 1]).*[1 1])+((CRS2>[img_W img_L]).*[img_W img_L]);',... 'Iine3=line([CRS2(1) CRS2 (1) ] , [1 img_L] , • 'Er' ', ' 'none' ',' 'Vi* ', "on" );',... ■Iine4=line([1 img_W),(CRS2(2) CRS2(2)J,''Er'',•'none*',''Vi'',''on'');']; prcs_all=['fMRI_pixels=find(CSC>=Thrld & CS>0)j',... 'diff_values=((D_R(£MRI_pixels)-min(D„R(£MRI_pixels)))',... •/(max(D_R(fMRl_pixels))-min(D_R(fMRI_pixels))));',... 'norm_C_c=(color_clip-MN_C_LVL)/(254-MN_C_LVL) 'di f f_values=round(MN_C_LVL+((2 54-MN_C_LVL)/norm_.C_c)*(di f f_values '(diff_values<=norm_C_c)+norm_C_c*(diff_values>norm_C_c)));',... 'm_mat=E_E;m_mat(£MRI_pixels) =diff_valuesjnew_img=m_mat(y_crp,x_crp) 'image(new_img+i,■•ButtonDovm'',BtDw);axis(''image'');axis(•'o f f . 'lo2=num2str(Thrld);[1 1,th_i]=strtok(lo2,46);th_i(1)=[];’,... *new_n=[str3 ■'„Th‘' th_i]jtitle(new_n)jeval(he3). 47 'ac_px=int2str(length{find(new_img>=MN_C_LVL)));set(G_10,‘'String'1,ac_px); ]; h_crp=['if exist(''CRS1 'x_crp=ceil (min(CRSl (2) ,CRS2 [2))} :floor (maxtCRSl (2J ,CRS2 (2) ‘y_crp=ceil (min(CRS1 {1J ,CRS2 (1))} :floor (maxtCRSl (1) ,CRS2(1) 'clear linel line2 line3 line4;end;']; set(L_G,'Value',gray_clip,'CallBack.',['set(G_5,''String' 'int2str{get(L_G,''Val ■gray_clip=get(L_G,''Val''eval(prcs_gray),','eval(prcs„all)']) eval(prcs_all); set(ALL_S,'Visib','on'); set([set_cut,set_noc],'Vis','on'J; set(h_l,'Color',[0 0 .6]); sett[Z_5,2_6],'Visib','off'); set(P_l,'Callback',['set(h_lj ''Color'',[0 0 0],''colormap1',gray(256) 'orient tall;print ' new_n *_BW -dps;',,.. 'set(h_l,''Color'',[0 0 .6],''colormap'',clr_jnp);']); settP_2,'Callback',['setth_l,''Color*',[0 0 0]);orient tall;',... 'print ' new_n '_Color -dpsc;set(h_l, • 'Color", [0 0 .6]),*']); settP_3,'Callback',['set(h_l,''Color•',[0 0 0]};orient tall •print ' new_n '_GIF -dgif8;set(h_l,''Color'',[0 0 .G]); ']); set(A_l,'Callback',['file„w=[new_n '*_16bit.fMRl ’bin_ira=new_img'';p_c_w=’*uintl6'';eval(bin_W);'J); set(A_2,'Callback',['file_w=[new_n ''_8bit.fMRI'*];'... 'bin_ira=new_img'';p_c_w=''uint8’';eval(bin_W);']); set(A_3,'Callback',['file_w=[new_n clr_xt];TIF_img=255-new_img;1,... •TIF_mp=flipud(clr_mp) ;runfMRI7 ;']),* % % % % % % % End of Second Program % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % • THIRD PROGRAM: % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % MATLAB program File name: run£MRl3,m Date: Apr.19.95 % % *** THIS PROGRAM PROCESSES PRE-PROCESSED fMRI IMAGE FILES *** % % % % global SZ gray_clip color_clip MX_G_LVL MN„C_LVL clr_g clr_r clr_c clr_mp; set(h_l,‘Color*,[0 0 0]); set([ZZZ,ALL_S],'Visib’,'of£'); set(L_T,•Val•,.6); set(T_4,•Str',‘0.6■); ff5=subplot(1,1,1);ff6=image(zeros(10));set([ff5,£f6],'Visi *,'off'); empty_c=zeros(SZA2,1); [a_n,a_p]=uigetfile'Choose the anatomical file for this plane',99,99); root_s=a_p(length(wor_dir)+l+findstr(a_p,wor_dir):length(a_p)); int_indx=find( (root_s>=48 & root_s<=57) | ... (root_s>=65 & root_s<=90) | ... (root_s>=97 & root_s<=122)); str3=root_s(int_indx); in_f=[a_p a_n]; eval{£ile_status); [a_name,a_ext] =strtok|in_f ,46) ; FF=empty_c; eval(bin_R); AF=FF; AF=AF-min(AF): max_AF=max(AF); [lo_n,lo_x]=hist(AF); all_n=cumsum(lo_n); limitF=0.9B*(SZA2); gray_clip_l=ceil(min(lo_x(all_n>=limitF)>); gray_clip=round(gray_clip_l*MX_G_LVL/max_AF); set(G_8,'String',int2str(gray_clip)); set(L„G,'Value',gray_clip); E_E=empty_c f %Normalized: AF=AF/max_AF; norm_g_c=gray_clip_l/max_AF; prcs_gray= t... 'norm_g_c=gray_clip/MX_G_LVLfE„E=round(',.,, '(MX_G_LVL/norm_g_c)*(AF.*(AF<=norm_g_c)+norm_g_c*(AF>norm_g_c)));',.,, 'E_E=reshape(e_e ,sz,sz);•,... 'set (G_5< 1 'String* * ,int2str (round(get(L_G, ' 'Val ■'))));•]; eval(prcs_gray); % -% in_f=[a_name '.slcc'J; eval(file_status); [s_name,s_extj=strtok(in_f,46); eval(bin_R); CS=zeros(size(FF)); CS(FF>= -1 & FF<=1)=FF(FF>= -1 & FF<=1); in_f=[a_name '.mice']; eval(file_status); £ra_name,m_ext]=strtok(in_f,46); eval(bin_R); CSC=zeros(size(FF)); CSC(FF>=0 & FF<=1)=FF(FF>=0 & FF<=1); CSC=(CSC-min(CSC))/(max(CSC)-min(CSC)); in_f=[a_name '.diff'Jf eval(file_status); [d_name,d_ext]=strtok(in_f,46); eval(bin_R); D_R=FF; ^ > — — — — Thrld=.6;subplot(1,1,1); img_W=SZ;x_crp=l:img_W; img_L=SZ;y_crp=l:img_L; BtDw=[1 if exist(''linel’•),',... 49 •set([Iinel,line2,line3,line4], "Er’1,''norm'1,''Vis'',''off1');end;',... •CRSl=ginput(l);CRS1=CRS1.*(CRS1>=[1 1] & CRSl<=[img_W img_Lj)+•,... '((CRS1<[1 1]).*[1 1]} + ((CRS1> [img_W img_L]) . * [img_W i m g _ L ] . 1linel=line([CRS1(1J CRS1(1)],[1 img_L],'’Er'',''none*', ''Vi*•,•'on" . 'Iine2=line( [1 img_W], [CRS1 (2) CRS1(2) ] ,"Er",' 'none' ', "Vi" , "on' . 'CRS2=ginput(l);CRS2=CRS2.*(CRS2>=[1 1] & CRS2<=[irog_W img_L])+',... 1((CRS2<[1 1])+((CRS2>[img_W img_L]).*[img_W irag_L]. 'line3=line{[CRS2 (1) CRS2 (1) ], [1 img_L], "Er" , ' 'none' ', "Vi' ', "on" ),*',.. . 'line4=line([1 img_W], [CRS2{2) CRS2(2) ], • 'Er' ', • 'none' ' , ' 'Vi' •, "on" }( •] ; prcs_all=['fMRI_pixels=find(CSC>=Thrld £ t CS>0| •diff_values=((D_R(fMRI_pixels)-min(D_R(fMRI_pixels) •/(max(D_R(fMRI_pixels))-min(D_R(fMRI_pixels))});',... 'norm_C_c=(color_clip-MN_C_LVL)/(254-MN_C_LVL) ■diff_values=round(MN_C_LVL+{(254-MN_c_LVL)/norm_C„c)*(diff_values.*',... ' (dif f_values<=norm_C_c)+nom_C_c* (dif f_values>norm_C_c) 'm_mat=E_E,*m_mat(fMRI_pixels)=diff_values;new_img=m_mat(y_crp,x_crp) 'image(new_img+l, ' 'ButtonDown' ', BtDw) ;axis( ' 'image' ') ,*axis(' 'off' *lo2=num2str(Thrld);[1_1,th_i]=strtok(lo2,46),*th_i(1) 'new_n=[str3 "_Th" th_i]; title(new_n) ,*eval (he3) ,*',... 'ac_px=int2str(length(find(new_img>=MN_C_LVL)));set(G_10,''String*',ac_px);• 1 ; h_crp=['if exist ( "CRS1"),',.. . •x_crp=ceil(min(CRSl(2),CRS2(2>)):floor(maxtCRSl(2),CRS2(2)));',... ‘y_crp=ceil(min(CRSl(1),CRS2(1))):floor(max(CRS1(1),CRS2(1) 'clear linel line2 line3 line4;end;1); set(L_G,'Value',gray_clip,'CallBack',[’set(G_5,''String' 'int2str(get(L_G,''Val''))),',... 'gray_clip=get(L_G,''Val 'eval(pres gray),','eval(prcs_all)’]); %set(get(h_r),'YLabel', *65'); eval(prcs_all); set(ALL_S,'Visib*,'on1)jset([set_cut,set_noc],'Vis•,'on') , * set(h_l,'Color', [0 0 .6]); set(P_l,'Callback',t'set(h_l,''Color'‘,[0 0 0),''colormap'1,gray(256) 'orient tall (print ' new_n '_BW -dps,*',... 'set(h_l, ''Color'', [0 0 .6], "colormap" ,clr_mp) ,*']); set(P_2, 'Callback',[ 'set(h_l, "Color" , [0 0 0]);orient tall;',... ■print ' new_n '_Color -dpsc;set(h_l, "Color", [0 0 .6]);']),- set(P_3,'Callback*,['set(h_l,''Color'',[0 0 0]) (orient tall,*',... 'print ’ new_n *_GIF -dgif8,*set(h_l, ' 'Color' ', [0 0 .6] ),■')) , * set (A_l, 'Callback*, [' file_w= [new_n * *_16bit. fMRI "],*'... 'bin_im=new_img,*p_c_w=' *uintl6' ';eval (bin_W) ;']),* set(A„2,'Callback',['file_w=[new_n •’_8bi t.fMRI "];'... 'bin_im=new_img,*p_c_w=' 'uintB ' ' ,-eval (bin_W) , • ’] ),• set(A_3, 'Callback', ('file_w=[new_n clr_xt] ,*TIF_img=255-new_img; ', .. . •TIF_mp=flipud(clr_mp) ,*runfMRl7j ' ]) , * % % % % % % End of Third Program % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 50 dP dP dP • FORTH PROGRAM: % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % MATLAB program File name: runfMRI4.m Date: Apr.19.95 % % % % *** THIS PROGRAM DISPLAYS THE SAVED fMRI IMAGE FILES *** % % % % % set(h_l,'Color*,[0 0 0]); set{[ZZZ,ALL_S],'Visib','off'); W_jn=[ .1 .66 .36 .2783;.53 .66 .36 .2783;... .1 .35 .36 .2783;.53 .35 .36 .2783;... .1 .04 .36 .2783;.53 .04 .36 .2783]; ff5=subplot(1,1,1);ff6=image(zeros(10));set([ff5,ff6],'Visi','off'); for disp_loop=l:disp_N, [m_n,m_p]=uigetfile( fMRI','Choose the image file to display',99,99); if m_p==0,break,end; if m_n=='*,break,end; [m„name,m_ext] = strtok(m_n,46); str4=m_name(l:findstr (m_name, '_ Th' )+5); in„£=[m_p m_n]; eval(file_status); eval(bin_R); m_FF=reshape(FF,SZ,SZ)•; clear FF; axes('Posi',w_m(disp_loop,:)) image(m_FF);axis off;title(str4);eval(he) end; set(Iset_gray,set_red,set_colors],'Visib',’on'); m_me=[m_n(1:findstr(m_n, "Th*)+4) int2str(disp_N)]; set(P_l,'Callback*,['orient tall; print ' m_jne '_fMRl_BW -dps']); set(P_2,'Callback*,['orient tall; print ' m_pie '_fMRI_Color -dpsc']); set(P_3,'Callback',['orient tall; print ' m.jne '„fMRI_GIF -dgif8']); % % % % % % % End of Forth Program % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 8. REFERENCES 1. M. Singh, Z. H. Cho, J. P. Jones. Foundations of Medical Imaging. Wiley, 1993. 2. General Eelectric publication, NMR, A Perspective On Imaging, 1984. 3. N. C. Andreasen, G. Cohen, G. Harris, et al. Image Processing for the Study of Brain Structure and Function: Problem and Programs. J Neuropsychiatry 1992; 4(2): 125-133. 4. A. C. Kak, and M. Slaney, Principles of Computerized Tomographic Imaging, IEEE Press, 1987. 5. S. Zeki, J.D.G. Watson, C.J. Lueck, et al. A Direct Demonstration of Functional Specialization in Human Visual Cortex. J Neurosci. 1991; ll(3):641-649. 6. J. E. Desmond, et al, Language Laterization In Epileptic Patients: A Clinical Application for functional MRI, fMRI workshop: San Francisco, CA.; Mar. 25.1995 7. Y. Cao, V.L. Towle, D.N. Levin, et a l Functional Mapping of Human Motor Cortical Activation with Conventional MR Imaging at 1.5T. JMRI 1993; 3(6):869-875. 8. B. N. Mora, G.J. Carman and J.M. Allman. In Vivo Functional Localization the Human Visual Cortex Using Positron Emission Tomography and Magnetic Resonance Imaging. TINS 1989; 12(8):282-284. 9. P. T. Fox, M.E. Raichle, M.A. Mintun, et al. Nonoxidative Glucose Consumption During Focal Physiologic Neural Activity. Science 1988; 241(22):462-464, 10. M. Singh. Toward Proton MR Spectroscopic Imaging of Stimulated Brain Function. IEEE Tran. Nucl. Sci.; 39(4): 1161-1164. 11. G. M. Hauthout, K.A.T. Kirlew, G.J.K. So, et al. MR Imaging Signal Response to Sustained Stimulation in Human Visual Cortex. JMRI 1994^37-543; 41. 12. L. R. Schad, F. Wenz, M.V. Knopp, et al. Functional 2D and 3D Magnetic Resonance Imaging of Motor Cortex Stimulation at High Spatial Resolution Using Standard 1.5 T Imager. Magn. Reson. Imaging 1994; 12:9-15 52 13. D. D. Stark, W. G. Breadley, Jr. Magnetic Resonance Imaging vol. 1. Mosby Year Book, 1992. 14. M. E. Phelps, D.E. Kuhl. Metabolic Mapping of the Brain Response to Visual Stimulation: Studies in Humans. Science 1981;211(27): 1445-1448. 15. K. D. Merboldt, W Hanicke and J. Frahm. Functional MR1 of Human Brain Activity af High Spatial Resolution. J. 1993;139-144. 16. P. D. Rothman, E. Novotny, et a l, Lactate Rise Detected by 'H NMR in Human Visual Cortex During Physiologic Stimulation. Proc. Natl. Acad. Sci. 1991; 88:5829-5831. 17. J. W. Belliveau, K.K. Kwong, D.N. Kennedy, et al Magnetic Resonance Imaging Mapping of Brain Function: Human Visual Cortex. Invest. Radiol. 1992;27:S47-S53. 18. F. Eden, J. M. Maaisog, P. Jezzard, et a l A comparison of PET and MRI in the Neuroanatomical Localization of Visual Processing. Book of Abstracts 13th SMRM: 691. 19. M. Singh, et a l, Functional MRI at 1.5 T, IEEE Trans, on Nuclear Sc. 41 (4) Aug. 1994. 20. R. Menon, et a l, Functional Brain Mapping Using Magnetic Resonance Imaging, Ivest. Radiol., 1992; 27:S47-S53. 21. J. Ellerman, et a l, Functional Imaging of the Brain by Nuclear Magnetic Resonance, NMR in Phsiol. & Biomed., 1994; 137:150, 22. W. J. Huk, et al, Magnetic Resonance Imaging of Central Nervous System Deseases, 1990. 23. The Mathwork Inc., MATLAB™ Reference Manuals, Version: 4.2 c. 53
Linked assets
University of Southern California Dissertations and Theses
Conceptually similar
PDF
Three-dimensional functional mapping of the human visual cortex using magnetic resonance imaging
PDF
Human Skeletal Muscle Oxygenation And Perfusion: Non-Invasive Measurement By Near-Infrared Spectroscopy
PDF
Functional water MR spectroscopy of stimulated visual cortex using single voxel
PDF
Reduction of artifacts in functional magnetic resonance imaging
PDF
Flourine-19 NMR probe design for noninvasive tumoral pharmacokinetics
PDF
A multimodal screen reader for the visually impaired
PDF
Comparison of evacuation and compression for cough assist
PDF
Auditory brainstem responses (ABR): quality estimation of auditory brainstem responsses by means of various techniques
PDF
Respiratory system impedance at the resting breathing frequency range
PDF
Pulse oximetry failure rates
PDF
Auditory brainstem responses (ABR): variable effects of click polarity on auditory brainstem response, analyses of narrow-band ABR's, explanations
PDF
Application of dynamic mixture model to fMRI
PDF
A physiologic model of granulopoiesis
PDF
Propofol Effects On Eeg And Levels Of Sedation
PDF
Estimation of upper airway dynamics using neck inductive plethysmography
PDF
Cross-modal prepulse modification of ERP and startle
PDF
Bayesian estimation using Markov chain Monte Carlo methods in pharmacokinetic system analysis
PDF
Computation and validation of circulating blood volume with the indocyanine green dilution technique
PDF
Mapping the auditory function of the human brain using magnetic resonance imaging
PDF
Head injury biomechanics: Quantification of head injury measures in rear-end motor vehicle collisions
Asset Metadata
Creator
Al-Dayeh, Louai
(author)
Core Title
Processing And Visualization In Functional Magnetic Resonance Imaging (Fmri) Of The Human Brain
Degree
Master of Science
Degree Program
Biomedical Engineering
Publisher
University of Southern California
(original),
University of Southern California. Libraries
(digital)
Tag
Computer Science,engineering, biomedical,health sciences, radiology,OAI-PMH Harvest
Language
English
Contributor
Digitized by ProQuest
(provenance)
Advisor
Singh, Manbir (
committee chair
), Kalaba, Robert (
committee member
), Maarek, Jean-Michel (
committee member
)
Permanent Link (DOI)
https://doi.org/10.25549/usctheses-c18-12349
Unique identifier
UC11357712
Identifier
1380455.pdf (filename),usctheses-c18-12349 (legacy record id)
Legacy Identifier
1380455-0.pdf
Dmrecord
12349
Document Type
Thesis
Rights
Al-Dayeh, Louai
Type
texts
Source
University of Southern California
(contributing entity),
University of Southern California Dissertations and Theses
(collection)
Access Conditions
The author retains rights to his/her dissertation, thesis or other graduate work according to U.S. copyright law. Electronic access is being provided by the USC Libraries in agreement with the au...
Repository Name
University of Southern California Digital Library
Repository Location
USC Digital Library, University of Southern California, University Park Campus, Los Angeles, California 90089, USA
Tags
engineering, biomedical
health sciences, radiology