The research ethics committee of Bellvitge University Hospital (Barcelona, Spain) approved the study and informed consent was waived. The confidential data from patients were anonymized and protected in accordance with national and European regulations.
Statistical analysis of patient characteristic distribution
Statistical tests were performed to compare: (i) patient age distribution between training and test sets of each tumour type (Welch’s t-test), as well as among tumour types (one-way ANOVA); (ii) patient sex distribution between training and test sets of each tumour type (Fisher’s exact test), as well as among tumour types (Chi-square test). Relations shown in Supplementary Table S1.
Data pre-processing
The MRI scans were performed in 1.5T Philips scanners (219 on Ingenia and 221 on Intera). The DSC-PWI acquisition parameters were: temporal sampling of 1.26-1.93 seconds, 40-60 timepoints, acquired during a bolus administration of gadolinium contrast agent (gadobutrol 0.1 mmol/kg) without contrast preload (more details in Appendix B of the Supplementary Material).
The DSC-PWI dynamic sequence was motion-corrected by rigid registration of all DSC volumes. Bias field correction28 was applied to the CE-T1WI, which was rigidly registered to the DSC-PWI. Brain region masking was obtained on the CE-T1WI using a hierarchical approach29. Segmentations of the enhancing tumour and contralateral normal-appearing white matter were first obtained by simple thresholding and afterwards revised by an experienced neuroradiologist (APE). The TICs reflecting the bolus passage in every voxel of the DSC-PWI sequence were extracted for the enhancing tumour and normal white matter regions. According to a previously presented normalisation method23, TICs from the enhancing tumour were normalised to the white matter. The minimum peak point of the TICs was retrieved, the curves were aligned to this point and TICs with points within the average plus and minus standard deviation were used for training the CNNs. Slicer30 (www.slicer.org) and Python 3.8 were used for segmentation, processing, training, inference and statistical tests.
CNN architecture
A CNN was designed with three 1D convolutional layers with kernel sizes [3,5,7], followed by a 10% dropout layer and max pooling layer (pool size 2), then concatenated into a dense layer with 100 nodes of rectified linear units and a final binary output layer with softmax activation, cross-entropy loss function and Adam optimizer. The CNN was built using Tensorflow v2 with Keras frontend. The CNN classifier receives a given TIC as input and outputs a binary probability.
Classification scheme
By applying the CNN classifier voxel-by-voxel, a probability map is obtained over the enhancing tumour region. These voxel-wise probabilities are then converted into a patient-wise classification as:
Above, is the number of voxels with a probability higher than 0.9 for one tumour type and is the number of voxels with a probability higher than 0.9 for the second tumour type on the binary classifier. The tumour type of each patient was inferred by applying Youden’s index (highest sum of specificity and sensitivity in the training set) to the voxel proportion above. In practice, a 3-class classifier differentiating between PCNSL, GMB and metastases was implemented by concatenating two 2-class classifiers. The first classifier distinguishes PCNSL from non-PCNSL cases, while the second classifier differentiates the non-PCNSL cases into GBM or metastasis (Fig. 1).
Classification performance and interpretation
Classification accuracy, sensitivity and specificity were obtained for 100 groups of 25 randomly-selected patients from the test cohort in order to obtain average classification performance and 95% confidence intervals (CI) for all classifiers, as reported in Supplementary Table S2.
In addition, the area under the ROC curve was obtained for binary classifications, which shows the trade-off between sensitivity and specificity of different classification thresholds (Fig. 2B). The thresholds were set by Youden’s index as described above, but the app allows users to change them to meet different clinical needs, as discussed. Average ROC curves were obtained for the 3-class problem (Fig. 2C).
Current standard metrics of DSC-PWI analyses were obtained to compare against our voxel-trained CNN. Mean PSR and mean rCBV were computed with Slicer, for which further details can be found in Supplementary Appendix C. Classification metrics and ROC curves were obtained for PSR and rCBV applying the same classification structure used for the CNN-based approach.
CNN interpretation
The CNN provides a tumour-type probability value from each TIC found in each voxel. The map inherently informs about the decision process of the CNN classifier towards one tumour type or another and, more importantly, about the confidence of the classification in spatial regions.
To further explore the features that the CNN associated with each tumour type, down to the individual timepoints of the DSC-PWI TIC signal, we applied a score-weighted visual explanation for CNNs (ScoreCAM22). On Fig. 3A, the importance score was scaled to sum 1 over all timepoints in every voxel, in order to see the spatial relative importance. On Fig 3B, the average importance score is shown in each timepoint for each tumour type, with the average tumour TIC from the training data overlayed in black, in order to see the temporal differences.
Development of the online app BERRY
The processing and classification pipeline was bundled into a Docker image which can run as a standalone application in any system (Fig. 4). For demonstrative purposes, the BERRY app is also available on the VHIO server through a web interface, so that it is accessible from anywhere using an internet connection. The user can input their anonymized DSC-PWI and CE-T1WI scans in raw DICOM, Nifti or NRRD formats and, optionally, their own segmentations. When the study is processed, the tool shows the average TIC, the result of the classification and the spatial probability map. The online tool can be accessed at https://berry-app.vhio.org for research purposes.