Web Based Brain Volume Calculation for Magnetic Resonance Images
Brain volume calculations are crucial in modern medical research, especially in the study of neurodevelopmental disorders. In this paper, we present an algorithm for calculating two classifications of brain volume, total brain volume (TBV) and intrac…
Authors: Kevin Karsch, Brian Grinstead, Qing He
Abstract —B rain volu me calcul ations are cr ucial i n modern medical r esearc h, espe cially in the st udy of neurodevel op mental disorders. I n this p aper, w e present an algori thm for c alculati ng two cl assificat ion s of b rain v olu me, total br ain v olu me (TB V) and intr acrani al vol ume (IC V). Our al gorith m takes M RI data as input, pe rforms seve ral p reprocessi ng and i ntermediat e ste ps , and then return s ea ch of the two ca lcul ated volum es . To si mplify this proces s an d make our al gor ith m publi cly acce ssibl e to anyone, w e have create d a w eb-based interf ace that al lows user s to u pload t hei r ow n M RI data a nd ca lcul ate t he TB V an d ICV for the gi ven d ata. This interface provi des a si mple and efficient method for calcul ating these tw o classific ations of brai n volu me, and it also re moves t he need for t he user t o dow nload or install an y applicat ions. I. I NTRO DUCTI ON rai n v olum e pl ays an im port ant rol e in the st udy of neuropsych iatric disorders. Brain v olumes are compared between pati ents wi th disorders an d controls to determ ine if the volume differen ces are related to pathogenes is [2,4]. More important ly, brain volume is used as an adjustment factor in th e comparison of a specific brain structure betw een patient s and control s. Some exam ples can be found in [5-7]. There are also diff erent types of brain volumes, which have to be carefully selected when used as adjustmen t factors [1]. Brain volum e calculatio n thus becom es an indispensable process in most neuroimag ing analys is. Although this appears simple, to our k nowledge there are no rea dily available applications to achieve this ta sk. There are however several applications that aid this calculation, such as brain extraction tools, bu t few if any of these are we b-based an d most requ ire the user to dow nload ex ecutables and install additional libraries locally. Furth ermore, the installation and use of the downloadable soft ware is often not simple and requires th e user to install many other libraries unnecessary for brain extraction and brain volume calculatio n. This work was support ed in part by the Th ompson Cent er for Autism and Neur odev elopm ental Re sear ch Scho la r Fund, the Shuma ker Bio med ica l Informatics Graduate F ellowship, and the Unive rsity of Missouri Engine ering Hono rs Un derg raduate Rese arch Pro gram. Kevin Ka rsch i s an undergrad uate st uden t in the Depa rtmen t of Comput er Scien ce, Uni versit y of Miss ouri, Colu mbia , MO 65201 USA (phone: 314-8 08-5 136; e -mail : kr kq35@ mizz ou.e du). Brian Grinst ead is an und ergradu ate stu dent in th e Depart ment of Compu ter Sci ence, Un iversi ty of Mis souri, Columb ia, MO 652 01 USA (phone : 3 14-303- 881 7; e -mail : bpg 7vc@m izz ou.e du). Qing He i s a gra dua te studen t in the Dep artm ent of C omput er Scienc e, Univers ity of Miss ouri, Columbia, MO 65201 USA (phon e: 573-814-124 5; e-mai l: qh gb2@ mi zzou. edu). Ye D uan is an ass ista nt pro fes sor in the Depar tment of Compute r Sc ience , IEEE me mber, Unive rsity o f Missouri, Col umbia, MO 65201 USA (pho ne: 573 -882-395 1; e-ma il: duan ye@mis souri .edu ). The purpos e of thi s paper is to f irst dev elop an algorithm which will calculate two di fferent types of brain volumes . Then, we will present a web -based tool built fro m this algorithm to efficien tly calculate these two types of brain volumes. This web-based tool can be accessed from any ordinary web browser an d is located under the Sof tware section at http://web. missouri.edu/~duan ye/Research.htm. II. C RI T ERI A A ND M ETHODS A. Total Br ain Volume and I ntra cranial Vol ume We focus our volum e calculat ions on tw o separate classifications of brain volu me: total brain volume (T BV) and intracranial volume (ICV). While other classi fications of brain volume ex ist, TBV and ICV are the m ost straightforw ard to calculate and are often us ed in brain structure s hape analysis [2,4] . The defin itions of TBV and ICV hav e some in consistencies am ong me dical research articles, but for our purposes we will refer to TB V as th e grey and white matter of th e brain excluding the ventricles [1], and ICV as the sum of grey and white brain matter including the inner and ou ter cerebrospinal fluid spaces [3]. With these definitions, the IC V will alwa ys be g reater than or equal to TBV for any calculations done on the s ame MRI. B. MRI Image Format MRI can be stored in numerous different formats, and th ere are two gen eral classifications of formats for st oring MRI. The first is a scann er format, a form at in which the MRI is output from the m achine that captures the images. The other is an imag e processing form at which is obtai ned through a conversion of the MRI from the original scanner f ormat. For the purposes of this paper, we are interested primarily in the image processing format of MRI, specifically the Mayo Analyze Image (Ana lyze 7.5) and Neuroimaging Inf ormatics Technology In itiative (NIfTI-1.1) formats. For now, we leave th e conversion from the scann er format to ou r supported formats up to the user. Many tools exist for this conversio n, such as the open source application MRIcro, available at http://www.sph.sc.edu/co md/rorden/mricro.html. The Analyze f ormat consists of tw o files, a .hdr file an d a .img file. The header cont ains information about the image file, s uch as th e data type, im age dimens ions, and v oxel scale. The NIfTI format is adapted from the Analyze format; the most significant difference between NIfTI and Analyze is that the NIfTI format includes details about any af fine transformations that should b e applied to the MRI before vie wing [1 2] . Also, the NI fT I for mat is usual ly co ntai ned i n a single .nii file unlike the Analyze format. B W eb Based Brain V olume Calculation for Magnetic Resonance Images Kevi n Karsch, Brian Grins tead, Qing He, Ye Dua n C. P reproc essing Initially, we allow the user to input both NIf TI and Analyze files for brain volume calc ulation. For o ur calculations, Analyze files are the m ost efficient and easies t to handle because they separate the pix el data fro m the h eader data with their two-file implementation, and because th e data contained in the header is necessary f or our calculations. More importantly, An alyze files are compatible with the tools we use dur in g bra in vo lume c alc ula tio ns. In co ntr ast, some of t he information in NIf TI files is unnecessary when calculating brain volume, an d some tools requ ired for these calculation s wil l no t wo rk wit h NI fT I fil es. Ther efo re , we must fir st convert any NIfTI file a user uploads to the Analy ze format. We can do this accurately and efficiently using the Functional Magnetic Resonance Imag ing of the Brain Software Library (FSL ). Losing the extra data associated with the NIf TI file is acceptable because we are only interested in calculating the v olume, and the affine transformations cont ained in a NIfTI file, excluding scaling, will not affect this calculatio n. If any scaling i s applied to the NIfTI image, the scaling will b e applied to the voxel scales duri ng the conve rsio n to acc ount fo r this loss o f data [8, 11]. Once w e have obtained th e Analyze header and im age pair, we can proceed to the s kull stripped phas e. Also, if the user inputs an Analyze f ile, we can skip this preprocess ing stage. D. Brain Extract ion Before calculating the TBV and ICV for the g iven Analyze image, the sku ll must be stripped f rom of the image and a n ew Analyze file must be g enerated containing the n ewly created images that contain only the brain and not the rest of the skull and othe r non-brain tiss ue. To perform th is brain extraction , we use the FSL Brain Extraction Tool (BET) because of its speed and accuracy. Information about the implementation and val idation of the FSL BET can be foun d in [8-10]. The FSL BET takes in an An alyze i mag e pair and outputs a n ew Analyze image pair with the non-brain tissue deleted (Fig. 1). We can then use this new Analyze image to beg in calculating the TBV and ICV. If the user ch ooses to do so, he or she ca n extract the brai n with another ty pe of software and ski p this step. Fig . 1. Single slice of an MRI duri ng pre proce ssing stage s of the calcula tio ns. (a) I nitial u pload fro m use r. ( b) Re sulti ng sl ice af te r brai n ex tractio n us ing FSL B ET. E. Volume Calcula tion To calculate the volu me of the resul ting skull strip ped Analyze image pair, we have created an executable that takes an Analyze imag e pair as an argument an d returns both the ICV and TBV. To do this, w e first read the necessary information from the header file, su ch as the image dimensions, voxel scales in milli meters, and the data type (8, 16, and 32 bit i ntege r types as well as 32 bit floating precisi on types are com patible with the pr ogram). Using the image dimensions , we loop throu gh each vox el in the .img file, read the data at the give n voxel and store t he data into a three dimens ional array . For view ing pu rposes, w e must n ormalize the intensity at each voxel sin ce we can only display 8 bits of information and so me voxel values may originally contai n up to 32 bits o f information. To do this, we implement a contrast balancing algorithm that is u sed in MRIcro [1 3]. In short, the algorithm sets a ny voxel whose inte nsity is in and be low the 2 nd percentile to 0 (black), and any voxel whose intensity is in and above th e 98 th percentile to 255 (w hite). The remaining voxel intensities are then linearly interpolated between these two extremes to ens ure that all data po ints lie within the 8 bit scale. Although this normalization redu ces the accuracy of the original MRI intensity, t he reduction is negligible a nd is also necessary in order to comput e brain volume consistently among a v ariety of MRI. With the data now normalized and stored in the array, w e loop thro ugh each element in the array once more to per form several operations on the dat a, including the brai n volume calculation. Before the loop is executed, we initialize two variable s that denote the number of v oxels that sh ould be included in the TBV and IC V calculations . We also output each two dimensional image slice of the Analyze image in JPEG format to display on the w ebsite while the volume calculations are being performed. At each voxel, we check if the intensity of the voxel meets either the TBV or ICV criterion. If the criterion for either is met, we increment th e TBV and ICV variables respectively. For our implementation, we consider a voxel to be part of the ICV as long as the inte nsity at that voxel is not zero. T his means th at any voxel not deleted by the skull strip ping phase will be included in the ICV, which fits with our definition of ICV. Also, in our calculations, a given voxel is included in the T BV if its intensity is greater than or equal to some threshold. A thresh old value of 128 works the bes t in many cases s ince it is exactly half of the range of intens ities, and all grey and white brain matter is us ually in this t hreshold. Also, si nce any voxel that is a member of the TBV is also a member of the ICV, we can confirm that the TBV will always be less than or equal t o the ICV for each brain v olume calculation. An example can be fo und i n Fig. 2. When th e loop has finish ed, we obtain th e number of vox els that are to be in cluded in the TBV and ICV. Us ing the s caling information previously read from the header, we now multiply these totals b y the scale of each voxel in the x, y and z direction. The unit associated with each scale is millimeters, so t he results are al w ays in millimeters cube d. This final calculatio n gives t he final TB V and ICV, which we output to the user. Fig. 2 . An exa mpl e of th e di ffer ences bet ween TB V an d ICV on a si ngle slice of an MRI . ( a) Skul l strippe d sl ice obtai ned af ter pr epro cess ing the MRI. (b ) Imag e repr esen ta tion of pixels th at are in clud ed in the TB V. (c) Image r epres ent ati on of pi xels t hat are i nclud ed in the ICV. III. W EB -B AS ED U SER I NTERFACE Utilizi ng the algorithm provid ed in II, we have built a user friendly web site that allo ws anyone to calculate the TBV and ICV of a given MRI image set onl ine with no conf iguration on their own computers. This is useful becaus e the average user does n ot want to configure a library and compile source code on th eir computer wh en they will on ly use a couple of the utilities it provides. Our interface allows users to avoid downloading and installi ng these add itional programs if they are interested in com puting brain volume. When a user arrives at the web pag e, they must either create a user name and password or log in with credentials they have previous ly registered. Once logg ed in, the user will then be able to upload an MRI file (Fig. 3). After a user uploads the NIfTI o r Analyze MRI file, it i s stored o n the web server. A prog ram is then called to process th e image set, which will perform file type co nversion, brain extraction, and brain volume calculations. The TBV and ICV calculations are stored in a database so that the results can become available through the web interf ace the instant they are computed (Fig. 4). Also, while the vol ume is being calculated, the website d isplays the MRI slices after the brain extraction has taken place (Fig. 5). The entire process takes only a matter of minutes, and the actual execution of the all of programs embedded in the websit e take rou ghly ten s econds to three minu te depending on the u pload speed, size of th e file, an d the amount of preprocessing required. IV. C ONCLUS ION Brain v olume calculation has proven t o be difficu lt and inefficient for some res earchers, and som etimes these calculations lack accuracy as well. We have prov ided a simpl e and efficient web based m ethod for cal culating bot h the TBV and ICV f or a giv en Analyze or NIfTI im age, and have inte grate d o pen so urc e ap plic atio ns wit h our o w n programs to attempt to calculate these values with the utmos t accuracy. We hope to also add more functionality to the website in the future to im prove the ease at wh ich users can calculate volumes. T he first enhancement we will achieve is the ab ility to allow for additional MRI file types to be uploaded to our website, w hich will eliminate the need for the user to convert their MRI files to Anal yze of NIfTI themselves. Anothe r option we will give to the user is the abilit y to save the result ing images on ce we have perform ed th e brain ext raction and volume calculations so the user will be able to view a copy of the MRI show ing only the TBV or ICV v oxels. F ig. 3 . User int erfac e for up loadi ng an MR I in either An alyze of N IfTI forma t on the webs it e. Fig . 4. Re sults display e d on the we bsite o nce an MRI has be en pre proce sse d and the brai n vo lume calcul ations hav e be en per form ed. Fig . 5. We b displ ay o f sev eral MRI slices once t he bra in e xtract ion has bee n perf orme d. The user is abl e to s crol l thr ough e ach slice of M RI individ ually . R EFERENCES [1] L . M. O’Brie n, D. A . Z iegle r, C. K. D eutsc h, D. N. K e nnedy , J. M. G oldstein, L . J. Se idman, S . Hodg e, N . Makr is, V. Cav iness, J. A. Fr azier, an d M. R. Her bert, “ Adjus tme nt for w hol e brain and cr anial size i n volu metri c brain studi es: a review of c ommon dd jus tment fac tors and st atis tica l meth ods, ” Harv ard Revi ew of Ps ychiary , vol . 14( 3), pp. 1 41-15 1, July 2006. [2] H. C . Hazlet t, M. Poe, G. G erig, R. G. Smi th, J. P rovenza le, A. Ros s, J. Gil more , and J. P ive n, “Mag netic r eso nance i magi ng and head circum fer ence s tudy of br ain s ize in aut ism: b irth throug h 2 y e ars, ” Arch . Gen. Psy chiatr. , vol. 62, pp . 1366 -1376, 2005. [3] H. W olf, F . Krugg el, A . Hensel , L. W ahlund, T . A rendt, and H. G er tz, “The r elat ion ship b etween h ead size a nd in trac rania l volum e in elderl y subjects,” Brai n Resea rch , vol. 972(1), pp. 74-80 , May 200 3. [4] P. J. An d ers on , D . J. N et he rwa y, K. M cGl au gh l in , a nd D. J. Da vid , “I ntracranial vol ume me asurem ent of sagittal cranio syno stosis,” J. Clin. Neur osci. , vol. 14, pp . 455-45 8, 2007 . [5] C. N. V idal, R. Nicol son, T . J. De Vito, K . M. H ayashi , J. A . Geaga, D . J. D ro st , P. C . W i ll ia ms on , N . Ra ja k um ar , Y . S u i, R. A . Du tto n , A . W . Toga, an d P. M. Thomps on, “M apping corpu s callos um defi cits in au tism: a n inde x of aberrant co rtic al con nectiv ity,” Biolog ical Psychi atry , vo l. 60( 3), p p. 218- 225, 2006. [6] S. L. P al m er, W. E. R ed d ick , J. O. Gl as s , A. Ga jj a r, O. Go lou b eva , a nd R. K. Mu lher n, “D eclin e in corpu s callosu m volu me am ong p ediat ri c pa tients with medul lobl astom a: lo ngitud inal M R imag ing s tudy ,” AJNR Am. J. Neuro radio l. , vol. 23, pp . 1088– 1094, 2002 . [7] R . N i c o l s o n , T . J . D e v i t o , C . N . V i d a l , Y . S u i , K . M . H a y a s h i , D . J . D r o s t , P . C . W i l l i a m s o n , N . R a j a k u m a r , A . W . T o g a , a n d P . M . Thomp son, “Det ecti on and mapp ing of hipp oca mpal abn ormalit ies in au tism,” Psychi atry R esearch : Neu roimaging , vol. 14 8, pp . 11-2 1, 2 006. [8] S. M. Sm ith, M. Je nk ins o n, M . W . W oo lr ich , C. F . Be ckma n n, T. E . J . Behre ns, H. Jo hanse n-Berg, P . R. Bann ister , M. De Luca, I . Drobnjak, D . E . F l i t n e y , R . N i a z y , J . S a u n d e r s , J . V i c k e r s , Y . Z h a n g , N . D e Stefan o, J. M. Brad y, and P. M. Matthe ws, “Advan ces in fun ctiona l and struct ural M R image analy sis and im ple mentatio n as FSL , ” Ne uroIm age , vol. 2 3(S1), pp. 2 08-219, 2004. [9] S. M. Smit h, “Fas t robu st automa ted b rain ext ract ion,” Human Br ain Ma pping , vol. 17(3 ), pp. 143 -155, Novemb er 20 02. [10] S. Smit h. (20 08, M arch 4) . BET – brain extr action to ol (1 st ed. ) [On line] . Availa ble: h ttp ://www.fmr ib. ox.a c.uk/ fsl/ bet2 /index. html [11] S. Sm ith, and M. Je nkinso n. (2008, Mar ch 4) . FSLUTILS: misc ella neou s FS L image ut ilitie s (1 st ed.) [ Online] . Ava ilab le: ht tp://w ww .fmr ib.ox.ac .uk/fs l/av wutil s/inde x.htm l [12] M. Jen kinson . (200 8, Marc h 4) . NIfTI- 1 Data Form at (1 st ed. ) [On lin e]. Availab le: h ttp:/ /ni fti.nimh .nih. gov/nift i-1/ [13] C. Ror den , and M. Br ett, “Ster eotaxi c dis play of b rain lesion s, ” B ehavio ral Neur ology , vol. 12 , pp. 191 -200, 2000 .
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment