Web Application for Quantification of Traumatic Brain Injury-Induced Cortical Lesions in Adult Mice
- 101 Downloads
Disabilities resulting from traumatic brain injury (TBI) strongly correlate with the cytoarchitectonic part of the brain damaged, lesion area, and type of lesion. We developed a Web application to estimate the location of the lesion on mouse cerebral cortex caused by TBI induced by lateral fluid-percussion injury. The application unfolds user-determined TBI lesion measurements, e.g., from histologic sections to a reference template, and estimates the total lesion area, including the percentage of cortex damaged in different cytoarchitectural cortical regions. The resulting lesion can be visualized on a two-dimensional map of mouse cerebral cortex. The application also visualizes the development of the lesion over time when measurements from multiple time points are available. The web application was validated by comparing its performance to the manual method. The total area of the cortical lesion was similar between the manual (9.19 ± 0.66 mm2, range 4.25–14.93 mm2) and the automated analysis (9.27 ± 0.66 mm2, range 4.50–15.10 mm2) (p = 0.938). The results of the manual and automated analyses were strongly correlated (r = 0.999, p < 0.0001, Pearson correlation). The lesion localized in the same cytoarchitectonic regions when the unfolded map from the automated method was superimposed onto the map obtained using the manual method. The Web application-automated method is faster than the manual method in generating unfolded cortical lesion maps. The accuracy of the presented automated method in determining the anteroposterior level and outlining the lesion is equal to or greater than that of the manual method. Our application provides a novel tool for accurately quantifying and visualizing TBI lesions on mouse cerebral cortex.
KeywordsWeb applications Visualization Traumatic brain injury Mouse brain
The localization of traumatic brain injury (TBI) lesions directly correlates with motor disabilities and cognitive impairment (Chen et al. 2000). Ndode-Ekane et al. (Ekolle Ndode-Ekane et al. 2017) demonstrated that by unfolding magnetic resonance (MR) images of a lesioned rat cortex on a two-dimensional (2D) cytoarchitecture map of the cortex, it is possible to predict the severity of the resulting cognitive and behavioral impairment. In the report by Ndode-Ekane and colleagues, translation of the cortical lesion measurements to an unfolded map of the cortex was performed semi-manually using a combination of digitized measurements and image processing software (Ekolle Ndode-Ekane et al. 2017). This process, however, including estimation of the area of the affected cytoarchitectonic regions, is time consuming. In addition, freehand measurements performed using typical image processing software result in inter-researcher variability. Such manual mapping procedure is computationally straightforward and can be automated.
Web applications are computer programs that run within a Web browser. Implemented essentially as dynamic Web pages, Web applications can be executed by simply accessing the Web address of the application. No software installation is required to run Web applications. Encapsulation of the executed code within the browser makes Web applications inherently multi-platform, enabling users to utilize the application on their operating system of choice (e.g., Microsoft Windows, iOS, or Linux).
In an earlier report, we demonstrated the use of a Web-application, unfolded map (http://www.unfoldedmap.org/), for the localization of cortical lesions in a rat model of TBI (Andrade et al. 2018). To facilitate research on TBI using mouse models, we have implemented a novel Web-application CortexMap (https://www.cortexmap.org) for localizing lesions in the mouse cerebral cortex. Using imported measurements from MR or histopathologic images, our tool automatically maps to a template of the unfolded mouse cortex and quantifies the lesion area as well as the percentage of the damaged area in the different cytoarchitectonic cortical regions. When multiple measurements of the same lesion from different time points are imported, CortexMap visualizes the evolution of the lesion as a downloadable video file. The tool was validated by comparing the output maps with those drawn manually. In addition to a Web-application, our tool is available as a command-line application for offline use. The command-line version has additional support for user-made templates and can be utilized as a part of, e.g., batch processing pipelines.
Template of the Unfolded Cortex of the Mouse and Assessment of the Cortical Lesion
Preparation of the Two-Dimensional (2D) Template of the Unfolded Mouse Cortex
Measuring the Cortical Lesion and Generating the Input Measurements
Generation of a Cortical Lesion Using the Lateral Fluid-Percussion Injury Model
The cortical injury was induced in adult male mice (C57BL/6JOlaHsd background) using the lateral fluid percussion injury model as previously described by Bolkvadze and Pitkänen (2012). In brief, a 3-mm diameter craniectomy was made in the skull of isoflurane-anesthetized mice between bregma and lambda on the left convexity, ensuring that the dura remained intact. The brain injury was induced by a transient fluid pulse impact (1.8 ± 0.1 atm, corresponding to severe injury) against the exposed dura using a fluid-percussion device (AmScien Instruments, Richmond, VA, USA). Following the impact, the dura was confirmed to be intact and the surgical site was sutured. The mice were administered buprenorphine (Temgesic® 0.05 mg/ml, s.c.) and saline (0.3 ml, s.c.), and allowed to recover in their home cage. At 30 d after the injury, the mice were sacrificed by transcardial perfusion with 4% paraformaldehyde. The brains were extracted and then processed for histology. The brains were cut into 25-μm thick sections in the coronal plane using a sliding microtome.
Generating Input Measurements for the UFM
Producing the UFM of the cortical lesion requires the location and extent of the lesion as input estimates. These estimates can be derived from histopathologic coronal brain sections or from coronal brain slices of MR imaging (MRI) volumes. For each histologic section or MRI slice, the medial reference point was identified as described above. In addition, the rhinal fissure was used as the lateral reference point. The distance from the medial reference point to medial edge of the lesion (M1), from the medial edge of the lesion to the lateral edge of the lesion (M2), and from the lateral edge of the lesion to the rhinal fissure (M3) was assessed (see Fig. 5 for details). Lesions in cortical layer V were used as a reference for defining the medial and lateral edges of the lesion. Additionally, the anteroposterior coordinate of each histologic section or MRI slice is noted (MB). If the lesion extends lateral to the rhinal fissure, M2 is measured from the medial edge of the lesion to the rhinal fissure, and M3 is measured from the rhinal fissure to the lateral edge of the lesion. For lesions extending lateral to the rhinal fissure, M3 is given a negative value. This approach allows for determining the mediolateral position of the lesion using the rhinal fissure as a lateral reference point. The measurements are stored in a comma-separated value (CSV) or Excel (.xls, .xlsx) file with four columns. The columns of the file present the measurements in the following order: MB, M1, M2 and M3. The UFM map automatically accounts for the voxel size of MR images by shifting the measurements along the anteroposterior axis by half of the voxel size on the corresponding axis.
Calculating the Lesion Mapping
Normalization is performed separately for each slice. The inter-reference point distance (from medial reference point to the rhinal fissure) on the experimental case is calculated. If the lateral edge of the lesion is located on medial side of the rhinal fissure, the inter-reference point distance is the total sum of the M1, M2, and M3 distances. The inter-reference distance is divided by the cortical surface length in the atlas slice at the given anteroposterior level, which yields the ratio between the measured and atlas distances. The M2 and M3 distances are then multiplied by the ratio. M1 is omitted because the two first distances are sufficient for localization of the lesion. If the lesion extends to the lateral side of the rhinal fissure, the inter-reference point distance is the sum of M1 and M2. The ratio of this inter-reference point distance to the corresponding distance presented in the atlas is then calculated and used to adjust M3 and M2.
Translation. Distances M1, M2 and MB are converted into a lesion polygon in the template coordinate system using the template-specific units per millimeter ratio r. For each slice, lesion coordinates (rM1, rMB) and (rM2, rMB) are calculated by multiplying the lesion measurements by r. The lesion polygon is combined anticlockwise from all (rM1, rMB) pairs added in ascending order of rMB, followed by (rM2, rMB) pairs added in descending order of rMB.
Interpolation of the lesion contour is performed to estimate the mediolateral location of the lesion between the slices. For interpolation, either linear interpolation or Catmull-Rom spline interpolation (Catmull and Rom 1974) is used.
Quantification. The area of the intersection between each cytoarchitectonic region and the lesion contour is calculated. The region’s area of intersection is divided by the total area of the region to estimate the percentage of the region affected. The total area of cortex affected is the ratio of the sum of all affected areas to the total cortex area.
The Core module communicates with the Importer, Mapper, and Template modules. Importer performs interpretation of coordinates presented in different file formats. The input files are read by executing a separate WebWorker thread. The Mapper module executes the mapping of the lesion using the Template module, which encapsulates the data derived from the template SVG file. Similarly, to the Importer module, the Mapper module performs the mapping of the given measurements in a dedicated WebWorker thread. In addition to functions for mapping the region of interest coordinates, the Mapper module also exposes functions for drawing the mapped region of interest on a given HTML5 Canvas for exporting the mappings as .tiff images.
The reference cortical surface lengths from the atlas are stored as a JSON file. A plain SVG file is used to store the template data. SVG images are defined as XML text files, enabling queries on the contents of the images, e.g., to enumerate the different objects presented in the image. Each cytoarchitectonic region of the template is presented in the SVG image using a unique closed path, labeled with prefix “A_”. The zero point of the anteroposterior axis is presented by a rectangle labeled “ap_zero”, in which the y position denotes the zero point. Alternatively, the zero point can be denoted by a similarly named attribute of the image’s svg element. The template specific units per millimeter constant can likewise be presented either by a rectangle labeled “units_per_mm”, with width equal to the units per millimeter in the template space, or by an attribute of the svg element with the same name. When both attributes and svg rectangles are included in the same file, precedence is given to attributes over rectangles. Location of the rhinal fissure on the template is denoted by a path labeled “rhinal_fissure”. The SVG file can contain additional SVG objects for visualization purposes, e.g., area labels or axis lines. The additional objects will be included in the visualization of the map, but are omitted during calculations.
During application initialization, the SVG paths-presenting region areas in the image are transformed to polygons by approximating the paths’ cubic Bezier curves using Casteljau’s subdivision method (de Casteljau 1959). Using the polygon of the interpolated lesion contour and the polygons denoting cortical regions, the area calculations are implemented as Boolean operations on polygons.
The transition between two lesions in a time series data set is visualized using linear interpolation. When two subsequent measurement differ in the number of slices, dummy points are added on the contour of the lesion with less slices. The points are removed after the transition visualization is completed.
User Interface and Workflow
Mapping is performed by pressing the “Import” button, visible on the lower part of the import modal window (Fig. 3b). The estimated contour of the lesion is visualized on the map image displayed on the interface (Fig. 3c). The area quantification results are displayed in a table below the map image. (Fig. 3c). For each affected cytoarchitectonic cortical region, the percentage and area (mm2) of the region affected by the lesion are presented. The total percentage and area (mm2) of cerebral cortex affected are displayed at a separate column in the rightmost end of the table.
After first measurement file has been imported, a table presenting the imported measurement file will appear. Below the table, buttons with file and image icons are displayed. The former allows the user to export the quantification results in a CSV format. The latter enables the displayed lesion mapping to be exported in tagged image file(TIFF) and in portable document file (PDF) formats. The mapping is rendered in both formats, and the resulting files are compressed into a ZIP-file for download.
When measurements from two or more days are imported, an interactive chart presenting the percentage of areas affected at different time points is presented below the ratio table (Fig. 3e, See supplementary materials for details). The chart is included in TIFF and PDF formats in the downloadable ZIP-file - along with the area mappings, when the image export button is clicked. A visualization of the evolution of the lesion over the time points can be downloaded in WebM format by clicking the button with video icon, which is visible when measurements from two or more days are mapped. Imported measurements can be deleted by selecting a measurement from the measurement table, and clicking a button with trashcan icon which appears next to the video download button when a measurement is selected.
The CLI provides all functionalities present in the Web-application, but with added configurability. Through the CLI, the user can either process a single measurement file or all measurement files contained within a specific folder. The user can additionally specify a custom cortex template to be used. The command-line parameters for the CLI version of CortexMap are presented in supplementary Table 3.
Accessing the Software
CortexMap is located at URL www.cortexmap.org and is executed within the browser on the user’s workstation. During execution, both the measurements and the resulting maps are retained within the user browser. No communication occurs between the browser and the remote server after the application has been loaded. No browser plugins (e.g., Adobe Flash Player or Java) are required to execute the application. After page refresh or browser shutdown, mapping results are lost unless specifically exported from the application by the user.
The CLI version of the application can be installed through Node.js package manager, by typing command npm install cortexmap-cli in a folder selected by the user. After installation, the CLI application can be executed with command cortexmap-cli.
Materials & Method
Manual Unfolding of the Cortical Lesion from Histologic Sections
Quantification of the Lesion Area from the Manually Generated Unfolded Map
The unfolded cortical lesion maps (.tiff files) were opened in ImageJ. The spatial scale was then set in ImageJ to match the scale of the unfolded map (Analyze / Set scale). The lesion was selected using the polygon selection tool and the area was calculated automatically (Analyze / Measure). The area of the lesion falling within each of the different cytoarchitectonic cortical areas was calculated in a similar fashion.
Procedure for Automatic Unfolding of the Cortical Lesion Map Using the UFM Web-App
Obtain images of the brain from histologic sections or MRI slices and assess the lengths of M1, M2, and M3 as described above. For details on how to obtain the measurement in MR images see Andrade et al. (2018) and Ekolle Ndode-Ekane et al. (2017).
Enter the measured values in Excel columns in the following order: MB (anteroposterior atlas coordinate), M1, M2, and M3, and save the files. Where the lesion extends lateral to the rhinal fissure, enter M3 as a negative value (see above).
Using the Web browser, open the URL www.cortexmap.org
Open a file selection dialog by pressing the “Open” button.
The contents of the selected coordinate file and available mapping settings are displayed in the import modal window.
Select the type of preparation used: “Histology” for histologic sections and “MRI” for magnetic resonance images. For MR images, slice depth must be specified.
Choose between linear interpolation or spline interpolation. For spline interpolation, set the parameter alpha and the number of points used for smoothing by the spline.
If the measurements are part of a time series, define the measurements day in the “Day” box at the bottom of the modal. If not, the default value of day 1 can be used.
Press the “Map” button to perform the mapping.
The lesion is visualized on the map displayed on the interface. The table of affected regions is presented as a table below the cortex map.
If measurements from more than one day are to be mapped, return to step 4 and import the remaining measurements.
To alter the visualized lesion, press the “Settings” button. From the opened settings modal window, set the lesion border color and the lesion fill color. Choose between solid, dashed, or dotted border styles. Increase or decrease the lesion border width to achieve the desired width. Set the dots per inch of the resulting image.
Press button with file icon to export the ratios of the affected regions of the cortex in a CSV file. Press the button with image icon to export the mapped lesions TIFF and PDF. If measurements from more than one day are imported, click the button with video icon to export a video of the lesion development.
Results and Validation
Cytoarchitectonic Location of the Lesion on the Cortical Mantle: Manual Method Vs. Web Application
A total of 18 cases were used to validate the Web application. In all cases, when the 2D UFM generated with the manual method was superimposed onto that generated by the automated method (Web application), the lesion was observed to colocalize on the same cytoarchitectonic areas (Fig. 5b, see also supplementary Fig. 2 and Table 1). There were minimal deviations, however, which were most likely due to human errors resulting from imprecise plotting of the anteroposterior coordinate. The automated method can precisely plot the manually determined anteroposterior coordinate on the template with 0.01 mm precision as compared to the manual method.
Area of the Cortical Lesion: Manual Method Vs. Web Application
Repeatability: The same input measurements produce the exact same map for each researcher, removing inter-researcher variance.
Accuracy: Compared with the manual method, the Web application has equal or greater accuracy.
Speed: Automated generation of unfolded cortical maps of lesioned cortical areas is approximately 60 times faster than manual mapping. That is, it takes approximately 30 min to measure M1, M2, and M3 from digital images of histologic sections (11–13 sections) or MRI and enter the data into Excel. It takes approximately 1 h to manually map or plot the measurements onto PowerPoint slide with the template to produce the lesion. On the other hand, it takes less than a minute to map or plot the lesion using the automated Web application.
Accessibility: The Web application can be accessed everywhere without restrictions or need for prior installation. No installation of third-party browser plugins is necessary to execute the application. For offline use, the application can be installed through Node.js package manager (npm).
We have previously reported a similar Web app for the identification of the cortical lesion in the rat brain following TBI (Andrade et al. 2018). The mouse version presented in this study is operated the same as the rat version. However, the mapping back-end and the user experience with the GUI have received significant novel additions including the possibility to generate and visualize lesion progression from same animal using time series data acquired for example with MRI. This will significantly enhance follow-up of lesion progression. Other new features such as batch analysis using CLI will enable user to perform more maps in a shorter time.
In the current study the application was used for mapping the cortical lesion in mouse with severe TBI. The application can be extended to mild and moderate TBI mouse models and can also support other animal models. The limiting factor in the mapping is how the user defines the lesion boundaries when using histological or MR images. In future work, we intend to provide templates for utilization of the presented method in experiments performed, e.g., on monkeys. We will also add functionality for the visualization of lesion penumbra as a heatmap.
The web application accurately maps the manually determined measurements on to the template. Therefore, incorrect identification and measurement of the lesion boundaries on histological or MR images will result in a wrong cytoarchitectonic map of the lesion. It is therefore important that the user is competent in identifying the lesion in histological sections or MR images. In this study we use the cortical layer V to map the lesion boundaries. Due to our long-standing experience with this TBI model, we realized that Layer V is usually the most damaged layer. However, this is not always the case in some animals, thus, using layer V in this instance can lead to either an over estimation or underestimation of the lesion size. Another limitation is the difficulty in identifying layer V in MR images. Despite these limitations, we have previously shown that it is possible to identify the cortical lesion in MR images to the same cytoarchitectonic areas as in histologic sections using the unfolded map technique (Ekolle Ndode-Ekane et al. 2017). Other aspects that may compromised the mapping of the lesion with the web application including brain size, tissue shrinkage and accurate mapping of the anteroposterior coordinate have been previously published. For detail see Ekolle Ndode-Ekane et al. (2017).
Information Sharing Statement
The source code of CortexMap is available at https://github.com/UEFepilepsyAIVI/CortexMap. The CLI version of the application is available through npm with the name cortexmap-cli.
This study was supported by the Medical Research Council of the Academy of Finland (Grants 272249, 273909, and 2285733-9).
Open access funding provided by University of Eastern Finland (UEF) including Kuopio University Hospital.
- Catmull E, Rom R. 1974. A Class of Local Interpolating Splines. Computer Aided Geometric Design , pp. 31–326.Google Scholar
- de Casteljau, P. (1959). Outillages méthodes calcul. Citroën: Technical Report A.Google Scholar
- Franklin, K. B. J. P. G. (2007). The mouse brain in stereotaxic coordinates (3rd ed.). Amsterdam: Elsevier.Google Scholar
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.