Automated volumetric evaluation of intracranial compartments and cerebrospinal fluid distribution on emergency trauma head CT scans to quantify mass effect

Background Intracranial space is divided into three compartments by the falx cerebri and tentorium cerebelli. We assessed whether cerebrospinal fluid (CSF) distribution evaluated by a specifically developed deep-learning neural network (DLNN) could assist in quantifying mass effect. Methods Head trauma CT scans from a high-volume emergency department between 2018 and 2020 were retrospectively analyzed. Manual segmentations of intracranial compartments and CSF served as the ground truth to develop a DLNN model to automate the segmentation process. Dice Similarity Coefficient (DSC) was used to evaluate the segmentation performance. Supratentorial CSF Ratio was calculated by dividing the volume of CSF on the side with reduced CSF reserve by the volume of CSF on the opposite side. Results Two hundred and seventy-four patients (mean age, 61 years ± 18.6) after traumatic brain injury (TBI) who had an emergency head CT scan were included. The average DSC for training and validation datasets were respectively: 0.782 and 0.765. Lower DSC were observed in the segmentation of CSF, respectively 0.589, 0.615, and 0.572 for the right supratentorial, left supratentorial, and infratentorial CSF regions in the training dataset, and slightly lower values in the validation dataset, respectively 0.567, 0.574, and 0.556. Twenty-two patients (8%) had midline shift exceeding 5 mm, and 24 (8.8%) presented with high/mixed density lesion exceeding >25 ml. Fifty-five patients (20.1%) exhibited mass effect requiring neurosurgical treatment. They had lower supratentorial CSF volume and lower Supratentorial CSF Ratio (both p < 0.001). A Supratentorial CSF Ratio below 60% had a sensitivity of 74.5% and specificity of 87.7% (AUC 0.88, 95%CI 0.82–0.94) in identifying patients that require neurosurgical treatment for mass effect. On the other hand, patients with CSF constituting 10–20% of the intracranial space, with 80–90% of CSF specifically in the supratentorial compartment, and whose Supratentorial CSF Ratio exceeded 80% had minimal risk. Conclusion CSF distribution may be presented as quantifiable ratios that help to predict surgery in patients after TBI. Automated segmentation of intracranial compartments using the DLNN model demonstrates a potential of artificial intelligence in quantifying mass effect. Further validation of the described method is necessary to confirm its efficacy in triaging patients and identifying those who require neurosurgical treatment.


Introduction
The intracranial (IC) compartments, formed by the falx cerebri and tentorium cerebelli, have limited capacity to accommodate volume changes of the brain, blood, and cerebrospinal fluid (CSF) (Wilson, 2016).Brain injury results in reduction of CSF reserve that may lead to mass effect.This phenomenon can contribute to secondary injury, including cerebral edema, ischemia, and herniation.Further investigation is needed to understand the anatomical and pathological aspects of compartmental distribution of IC contents and its consequences.
Cerebrospinal fluid reserve is researched in terms of IC pressure (ICP) which is measured using intraventricular sensors, and volume which can be assessed on imaging studies (Dhar et al., 2021).However, there is no widely accepted method to quantify mass effect.The Marshall scale integrates qualitative aspects such as basal cistern effacement, midline shift exceeding 5 mm and high density lesion larger than 25 mm 3 , for prognostic assessment (Marshall et al., 1992).However, interrater variability may affect the results (Maas et al., 2005), and simplified formulas to ascertain the volumetric criterion may be imprecise (Vos et al., 2001).Automated volumetric evaluation may enhance its accuracy and assist in clinical decision-making at emergency departments without delays in diagnosis (Jain et al., 2019).
The growing demand for CT to detect IC hemorrhages and assess mass effect can be addressed through the use of artificial intelligence (AI) and machine learning (Chang et al., 2016;Heit et al., 2017;Raju et al., 2020;Brossard et al., 2021;Colasurdo et al., 2022).They are utilized in emergency care for various purposes, including triage, injury prediction, and outcome evaluation (Hunter et al., 2023).The ongoing efforts aim to automate lesion identification and segmentation, and assess CSF reserve (Monteiro et al., 2020;Colasurdo et al., 2022;Schmitt et al., 2022;Hunter et al., 2023;Yamada et al., 2023).
We conducted manual segmentation of IC compartments and threshold segmentation of CSF on emergency CT scans, which served as the ground truth.This data was then utilized as input for a deeplearning neural network (DLNN), which was trained to automate the segmentation task.
The main objective of this study was to develop an algorithm to quantify the mass effect requiring neurosurgical treatment on emergency head CT scans.

Methods
The study is in accordance with human rights declarations and regulations, and was approved by Institutional Review Board.Patient consent to the study was not required as it involved retrospective analysis of anonymized medical records.We screened head CT scans obtained from patients after traumatic brain injury (TBI) at a highvolume emergency department between 2018 and 2020.CT scans were performed on three scanners (Optima CT540, Revolution CT, Lightspeed VCT; GE Healthcare, USA).The manuscript was prepared following the CLAIM (Mongan et al., 2020) and the STROBE Guidelines.

CT screening and neurosurgical assessment
Studies with technical flaws, significant motion artifacts, or incomplete skull coverage were excluded.The presence of ischemia or hemorrhage, including subdural (SDH), epidural (EDH), intracerebral (ICH), cerebellar (CBH), subarachnoid (SAH), intraventricular (IVH), and contusions, was recorded.We undertook a thorough investigation to identify radiological criteria for mass effect necessitating neurosurgical treatment, drawing from the literature of the past two decades (Bullock et al., 2006a,b,c,d;Carney et al., 2017;Greenberg, 2019;Hawryluk et al., 2020;Greenberg et al., 2022).A summary of the criteria is shown in Supplementary Table S1.Neurosurgical assessment was independently carried out by three investigators, following the radiological criteria and clinical experience.

Manual segmentation
Two investigators segmented brain series of ≤1.25 mm slice thickness.The sagittal plane was manually adjusted to closely align with the falx cerebri, serving as the delineation between the left and right supratentorial compartments.During IC space segmentation we utilized the two-dimensional smart brush tool in Exhibeon3 DICOM viewer (Pixel Technology, Lodz, Poland) in the bone window (W: 2500 L: 800).The boundary with the spinal canal was drawn along the transverse plane, perpendicular to the

Network architecture
We used a convolutional neural network with basic UNet architecture in a 3D version (Falk et al., 2019).The model takes in a single-channel image as input and produces seven channels of output with segmentation.The model's encoder comprised five levels, with feature sizes of 32, 32, 64, 128, and 256, respectively.Leaky ReLU was employed as the activation layer (Xu et al., 2015).The total number of parameters in the model was 5.7 million.During the training process, the sum of Dice Loss and Cross Entropy was minimized using the AdamW optimizer.To schedule the learning rate, the One Cycle Scheduler technique was utilized with a maximum learning rate value of 0.001.PyTorch was used as a training framework.Augmentation and image processing was done in MonAI.Model weights were initialized randomly at the start of the training process.

Image preprocessing
The training and validation datasets were randomly selected to ensure representative coverage of the entire available data (Table 1).We conducted several preprocessing steps before utilizing medical images as inputs for our model.Firstly, the images were resampled to a spacing of 1 millimeter to ensure consistency in resolution.Secondly, based on the Hounsfield Scale a threshold value of 100 was applied to retain only the most relevant information.Specifically, any pixel values above 100 were set to this value.Following this, the intensities of the remaining pixels were normalized to range between −1 and 1.To ensure the model was exposed to a diverse range of inputs during training, randomly selected preprocessed images were used with augmentations such as Gaussian Noise, random contrast adjustments, and rotations.This helped to train a robust model capable of handling varied inputs.Single voxels marked as CSF by the initial threshold, which might have corresponded to artifacts or small post-ischemic lesions, were excluded from CSF.This augmentation resulted in a more faithful representation of the ventricular system and subarachnoid reserve on the CT scans, aligning with human perception (Figure 1).Upon visual inspection, the final model, which exhibited the smallest variations in studies with the greatest ground truth discrepancies, was selected.The performance metrics of the optimal model across all data partitions are provided in Table 1 and remained similar and consistent across both the training (dependent) and validation (independent) datasets.Consequently, we used the DLNN predictions from both the training and validation datasets to evaluate the clinical efficacy of CSF Distribution Ratios.

CSF distribution ratios
Volumetric data obtained from automated segmentation performed by the DLNN model was used to compute a series of quantitative indicators in each patient (Figure 2).The ratio "CSF/IC" refers to the proportion of CSF volume in relation to the IC space volume.The "Supratentorial CSF/IC CSF" represent the proportion of CSF in the supratentorial compartments relative to the CSF volume.
The "Supratentorial CSF Ratio" quantifies the asymmetry in CSF distribution within the supratentorial compartments by dividing the volume of CSF on the side with reduced CSF reserve by the volume of CSF on the opposite side.

Statistical analysis
We used StatSoft Statistica (Tulsa, OK) and R Programming.Continuous variables were compared using Mann-Whitney U test.Categorical variables were compared using either Pearson's chi-squared test or two-sided Fisher's exact test.Predictive model was developed using logistic regression modelling with backward stepwise feature selection with likelihood ratio-test and with p-value of greater than 0.01 needed for stepwise feature removal.The heatmap was generated using unsupervised hierarchical clustering analysis with the pheatmap package in R Studio.Bland-Altman plots were generated using the ggplot2 package in R Studio.Power analysis for the test group was done using the pROC package.It yielded a required sample size of approximately 31 cases and 154 controls, with control-to-case ratio of 5, an anticipated area under the ROC curve of 0.7 and a desired power of 0.95 at a significance level of 0.05.

Results
The study included 274 patients, mean age 61 years ±18.6.Example segmentations of the IC compartments and CSF are presented in Figure 1.The mean volumes are provided in Table 2.The intraclass correlation coefficient (ICC) values between manual and automated segmentations were all above 0.92 (Figure 3).
Mass effect that required neurosurgical treatment was present in 55 patients (20.1%).Supratentorial CSF Ratio below 60% demonstrated a sensitivity of 74.5% and specificity of 87.7% in accurately identifying these patients.The ROC curve illustrated an AUC of 0.88 (Supplementary Figure S1).Noteworthy, neurosurgery for mass effect was never indicated in patients whose CSF constituted 10-20% of the IC space, with 80-90% being supratentorial, and whose Supratentorial CSF Ratio was larger than 80%.Uni-and multivariate analyses of radiological predictors of mass effect requiring neurosurgical treatment is provided in Table 3.Based on the selected CSF Distribution Ratios, we created a triage protocol for patients at the emergency department (Table 4).
By utilizing unsupervised hierarchical clustering analysis (HCA), patients (columns) were grouped according to A the triage protocol based on the selected CSF Distribution Ratios (Figure 4A) the presence and type of IC bleeding, any high or mixed density lesion larger than 25 mL, midline shift greater than 5 mm, and appearance of basal cisterns (Figure 4B).Quantitative assessment (Figure 4A) associated with the triage protocol revealed three clusters of patients.The first cluster contained patients marked in red according to triage protocol, among whom 41 (60.3%) required neurosurgical treatment.In this group, all patients had a Supratentorial CSF Ratio below 60%.The second cluster contained patients marked in green who did not require neurosurgical treatment.All showed a balanced CSF distribution between IC compartments, and a Supratentorial CSF Ratio close to 1.The third cluster contains patients marked in yellow, among whom 14 (8%) required neurosurgical treatment.This is the largest and most heterogeneous group.
HCA based on the qualitative assessment is provided in Figure 4B.Clusters one and two were composed of patients with compressed basal cisterns, most of whom required surgery, whereas, patients in cluster three usually did not require surgery and were characterized by bilateral lesions, contusions, ischemia, traumatic SAH, and acute SDH.Cluster four included more than three-quarters of patients with either unremarkable head CT or surgical indications due to various lesions.HCA analysis highlights that incorporating the triage protocol based on the selected CSF Distribution Ratios could improve the accuracy of determining the need for neurosurgical treatment.

Discussion
Automated segmentation of IC compartments and CSF might contribute to fast, accurate, and consistent diagnosis of neurological emergencies.The underlying hypothesis is that various pathologies that require neurosurgical treatment, such as hemorrhage, brain edema, hydrocephalus or infarction, present as a mass effect associated with CSF displacement (Chen et al., 2016;Bobeff et al., 2018;Mönch FIGURE 2 The illustration showcases the proposed CSF Distribution Ratios, with their definitions outlined in the manuscript.Rows one and two visualize the numerator and denominator, respectively, for each CSF Distribution Ratio.In row three, the figure delineates potential applications of each ratio and elucidates the directional changes associated with specific pathologies.CSF, cerebrospinal fluid, IC, intracranial, This figure is original to this submission so no credit or license is needed.through an unmediated evaluation of images with a focus on the most outliers.DSC for training and validation datasets were broadly equivalent (Table 1) and ICC very high (Table 2); furthermore, upon visual assessment, automated segmentation excelled in accurately identifying CSF and effectively partitioning IC compartments (Figure 1).Emergency CT imaging aims to identify primary injuries, such as extraaxial hematomas, cerebral hemorrhage, contusion, and skull fractures.It also assesses their impact on IC contents, resulting in cerebral edema and increased ICP (Rincon et al., 2016).Both primary and secondary injuries reduce CSF reserve in the affected IC compartment or reduce the overall IC reserve in case of diffuse injury.In fact, radiological manifestations such as sulcal marking obliteration and brain displacement into sulci, cisterns, and ventricles, can be more challenging to observe than primary injuries itself.
Quantifying mass effect can improve the interpretation of radiological findings and reduce reliance on subjective descriptions with variable agreement among raters.Currently, there is no standardized method for quantitatively assessing mass effect, apart   from midline shift.The evaluation of radiological findings indicating increased ICP relies on the expertise of neurosurgeons and radiologists.Common terms used in radiological reports include "CSF reserve reduction/loss, " "sulci effacement/loss, " accompanied by specifying the location, such as "right-sided supratentorial" or "infratentorial." They are primarily qualitative and may not convey precise information.Our results show that CSF Distribution Ratios offer a valuable and potentially reproducible method to quantify mass effect.
Triaging imaging studies becomes increasingly important with the spread of teleradiology that potentially leads to delays in diagnosis.The use of CSF Distribution Ratios can prioritize cases with the utmost urgency, expedite radiology reports, and facilitate consultation between clinicians and radiologists, especially in centers with large numbers of CT scans (O'Neill et al., 2020).Possible triage criteria for categorizing patients into 3 risk groups of mass effect are outlined in Table 4.To comprehensively represent IC conditions, the protocol includes prognostic factors validated in univariate analysis and describes CSF reserve, supratentorial CSF asymmetry, and infra-and supratentorial CSF distribution.
Remote neurosurgical consultations frequently take place in distant hospitals and, if patient transportation is required, entail substantial costs and time.Frequently conservative therapy is preferred, still the stigma associated with IC hemorrhage, even without the need for neurosurgical treatment, can result in unnecessary patient transport.Automated segmentation and quantitative evaluation offer a precise and timely approach.This approach can be critical in situations where patient transport is risky and immediate surgery is being considered.It could facilitate remote neurosurgical consultations and aid in earlystage diagnosis at the emergency department.
The ratios "CSF/IC" and "supratentorial CSF/IC CSF" may capture nuances in mass effect resulting from infratentorial lesions and hydrocephalus due to aqueductal stenosis.The diagnosis of hydrocephalus requires clinical expertise and careful evaluation of signs and symptoms.CSF Distribution Ratios could enable more precise assessment of subsequent examinations within the same patient to achieve a more accurate and comprehensive disease monitoring.
Other pathologies that should be considered during the assessment of CSF reserve, where no localized primary injury is evident, include inflammatory or infectious processes, demyelinating diseases, vascular malformations, and metabolic disorders.Unless there is previous CT, it is often difficult to judge whether CSF reserve is within normal limits, diminished or severely diminished as a result of edema and mild brain swelling.Percentile grids for IC contents normalized by IC volume, gender, and age could guide radiologists by highlighting values outside established thresholds.For example, if normalized CSF reserve is below 3rd percentile, general brain swelling could be considered in impressions of radiologic report.Percentile grids could also help in cases of brain atrophy, a natural phenomenon associated with aging but not directly measured in clinical practice.In cases of cerebral atrophy, there is a notable reduction in the volume of both white and grey matter, which is subsequently supplanted by CSF.This phenomenon manifests radiologically as an enlargement of the lateral ventricles and widening of the arachnoid space fissures.Consequently, volumetric assessments reveal an increased CSF volume, leading to an increased CSF / IC ratio.Hence, the extent of cerebral atrophy can be quantitatively evaluated through our method, which leverages these radiological and volumetric changes.

Limitations
It was a single center study.We acknowledge the heterogeneity of our patient cohort, consisting of individuals who experienced TBI and were diagnosed at the emergency department.On one hand this contributed to the diversity of mass effect presentations, including CBH, SDH, global edema, and hydrocephalus, on the other highlighted the method's versatility as the precise cutoff points could be tailored in specific pathologies.Another limitation of our study is the absence of detailed information on which patients with hydrocephalus required drainage procedures, limiting our ability to robustly assess the effectiveness of the presented ratios in predicting the need for such interventions.Our sample had a small number of infratentorial lesions.Reproducibility of our DLNN model was not subject to test-retest assessment.HCA of quantitative variables and one qualitative variable is very likely to split the group based on the latter; however, our goal was to show correlations between CSF Distribution Ratios and mass effect requiring neurosurgical treatment.We did not consider clinical factors related to patients condition that may influence the decision to perform neurosurgery, such as patient age, functional status, Glasgow Coma Scale (GCS) score, and comorbidities; however, this was our assumption that the model should identify radiological predictors, and the final treatment decision is made by clinicians, who take into consideration all available information.The role of the DLNN is to provide accurate and timely information, but not to replace a trained neuroradiologist.Going forward, we plan to integrate lesion volume calculations into our algorithm to enhance its capabilities and provide precise cutoff points for particular lesions.

Conclusion
Automated segmentation of IC compartments and calculation of CSF Distribution Ratios may enhance clinical decision-making and improve emergency management.The DLNN model effectively partitions the IC space into supra-and infratentorial compartments.CSF Distribution Ratios offer timely estimation of CSF reserve thus may enhance the predictive value of radiological reports.The integration of AI into the medical field can enhance the accuracy and speed of clinical diagnosis.Further research and implementation of AI into the healthcare system present an area of great interest bearing in mind their promising potential.An artistic representation of oblique posterior view of IC contents revealing mass effect that requires neurosurgical treatment due to a left-sided acute SDH.The illustration exhibits the removal of both sides of the skull, as well as the dura mater covering the right and left hemispheres, except for the regions of the falx cerebri and tentorium cerebelli in order to show the limited capacity of the IC compartments to accommodate volume changes of the brain, blood, and CSF.The acute SDH over the left cerebral hemisphere causes midline shift, while the CSF reserve remains unaffected on the right side.SDH, subdural hematoma, CSF, cerebrospinal fluid leak, IC, intracranial.This figure is original to this submission so no credit or license is needed.

FIGURE 1
FIGURE 1Multiplanar reconstructions of manual (upper) and automated (lower) segmentations of IC compartments and CSF in the non-pathologic (left) and pathologic example (right) of emergency CT scans.The latter example shows a right-sided acute SDH with significant mass effect that requires neurosurgical treatment, despite a relatively low midline shift.Reduced IC reserve in the right supratentorial compartment is well visualized.SDH, subdural hematoma, CSF, cerebrospinal fluid, CT, computed tomography, IC, intracranial.This figure is original to this submission so no credit or license is needed.

FIGURE 3
FIGURE 3 Bland-Altman plots for the manual and automated measurements of: (A) IC volume, (B) CSF volume, (C) right supratentorial volume, (D) right supratentorial CSF volume, (E) left supratentorial volume, (F) left supratentorial CSF volume, (G) infratentorial volume, and (H) infratentorial CSF volume.Y axes represent the difference between manual and automated measurements.X axes represent the average of manual and automated measurements.The color of each dot signifies the training (black) and the validation (blue) datasets.The black horizontal line indicates the mean measurement difference (bias), and if it is below zero it means that the average automated measurement was lower than the average manual measurement.The two red dashed horizontal lines represent the limit of agreement (1.96 × SD).AI, artificial intelligence, CSF, cerebrospinal fluid, IC, intracranial, ICC, intraclass correlation coefficient, SD, standard deviation.This figure is original to this submission so no credit or license is needed.

FIGURE 4
FIGURE 4Heatmap representation of unsupervised HCA of selected quantitative (A) and qualitative (B) predictors of mass effect that requires neurosurgical treatment in patients after emergency head CT scans.Each column represents one patient, and they are grouped into clusters according to unsupervised HCA.The quantitative assessment (A) shows the selected CSF Distribution Ratios calculated from automated segmentation of IC compartments and CSF volumes and the proposed triage system presented in the Table 4, whereas the qualitative assessment (B) was based on the radiological reports and simplified formulas used to ascertain the volumetric criterion.Red indicates "yes" and blue indicates "no."Color legend for the continuous variables is provided in the diagram.Explanation and interpretation of the findings depicted in the figure can be found in the Results section of the article.CSF, cerebrospinal fluid leak, CT, computed tomography, HCA, hierarchical clustering analysis, IC, intracranial.This figure is original to this submission so no credit or license is needed.

TABLE 1
Patients characteristics and comparison of the DCS between training and validation datasets.

TABLE 2
Comparison of the volumes of IC compartments and CSF obtained from manual and automated segmentations of 274 head trauma CT scans performed at the emergency department.
et al., 2020;Dhar et al., 2021)(Figure5).Our key findings are: (1) there was strong agreement between manual and automated segmentations of IC compartments and CSF that support further validation of the latter and its use in clinical scenario, (2) CSF Distribution Ratios may help quantify mass effect and improve radiological reports without increasing time burdens.Evaluation of automated segmentations was done in the context of Dice Similarity Coefficient (DSC), volumetric measurements, and

TABLE 3
Radiological predictors of mass effect requiring neurosurgical treatment in 274 patients who were diagnosed at the emergency department.
CSF Distribution Ratios were calculated using automated segmentation by the DLNN model developed specifically for this study.Continuous variables are presented as medians and IQR.Supratentorial CSF Ratio was defined as a ratio of ipsilateral and contralateral supratentorial CSF volumes."Ipsilateral" and "contralateral" refer to the supratentorial compartment with reduced CSF reserve.CBH, cerebellar hemorrhage; CSF, cerebrospinal fluid; EDH, epidural hemorrhage; IC, intracranial; ICH, intracerebral hemorrhage; IQR, interquartile range; IVH, intraventricular hemorrhage; MLS, midline shift; NS, not significant; SAH, subarachnoid hemorrhage; SDH, subdural hemorrhage.

TABLE 4
Triage protocol for mass effect that requires neurosurgical treatment based on the three selected CSF Distribution Ratios obtained from automated segmentation using the DLNN model developed specifically for this study.
10.3389/fnins.2024.1341734Frontiers in Neuroscience 10 frontiersin.orgresearch presented in this article was funded from the project "RADi -asystent radiologa," co-financed by the European Union from the European Regional Development Fund under the Smart Growth Operational Programme 2014-2020, Priority Axis "Support for R&D activities of enterprises," Action 1.1 "R&D projects of enterprises," Sub-measure 1.1.1"Industrial research and development work carried out by enterprises."The project provided financial support for the preparation of the deeplearning neural network and technical support necessary for the study.