Skip to main content
Springer logoLink to Springer
. 2023 Apr 1;18(10):1925–1940. doi: 10.1007/s11548-023-02881-7

SlicerCBM: automatic framework for biomechanical analysis of the brain

Saima Safdar 1,, Benjamin F Zwick 1, Yue Yu 1, George C Bourantas 1,6, Grand R Joldes 1, Simon K Warfield 2,4, Damon E Hyde 2,4, Sarah Frisken 3,4, Tina Kapur 3,4, Ron Kikinis 3,4, Alexandra Golby 3,4, Arya Nabavi 5, Adam Wittek 1, Karol Miller 1,4
PMCID: PMC10497672  NIHMSID: NIHMS1897519  PMID: 37004646

Abstract

Purpose

Brain shift that occurs during neurosurgery disturbs the brain’s anatomy. Prediction of the brain shift is essential for accurate localisation of the surgical target. Biomechanical models have been envisaged as a possible tool for such predictions. In this study, we created a framework to automate the workflow for predicting intra-operative brain deformations.

Methods

We created our framework by uniquely combining our meshless total Lagrangian explicit dynamics (MTLED) algorithm for computing soft tissue deformations, open-source software libraries and built-in functions within 3D Slicer, an open-source software package widely used for medical research. Our framework generates the biomechanical brain model from the pre-operative MRI, computes brain deformation using MTLED and outputs results in the form of predicted warped intra-operative MRI.

Results

Our framework is used to solve three different neurosurgical brain shift scenarios: craniotomy, tumour resection and electrode placement. We evaluated our framework using nine patients. The average time to construct a patient-specific brain biomechanical model was 3 min, and that to compute deformations ranged from 13 to 23 min. We performed a qualitative evaluation by comparing our predicted intra-operative MRI with the actual intra-operative MRI. For quantitative evaluation, we computed Hausdorff distances between predicted and actual intra-operative ventricle surfaces. For patients with craniotomy and tumour resection, approximately 95% of the nodes on the ventricle surfaces are within two times the original in-plane resolution of the actual surface determined from the intra-operative MRI.

Conclusion

Our framework provides a broader application of existing solution methods not only in research but also in clinics. We successfully demonstrated the application of our framework by predicting intra-operative deformations in nine patients undergoing neurosurgical procedures.

Keywords: Brain deformation, Biomechanics, Brain shift, Framework

Introduction

During neurosurgery, the brain undergoes significant deformation known as brain shift, making it challenging to precisely locate the surgical target, such as a tumour or epileptic seizure onset zone. Intra-operative magnetic resonance images (MRIs) can provide the location of the surgical target during neurosurgery. However, the cost of intra-operative magnetic resonance imaging scanners is high (over $10 million) [1] and brain MRI acquisition takes a long time (about 45 to 60 min) [2], which interferes with the surgical operation. Furthermore, intra-operative MRI cannot be acquired for patients with electrodes implanted within the brain in epilepsy surgery.

Brain shift, which refers to the significant deformation of the brain during neurosurgery, can be analysed in purely mechanical terms using established methods of continuum mechanics [3]. To solve the equations of continuum solid mechanics, suites of computational biomechanics finite element and meshless algorithms [4, 5] exist to predict organ deformation, including brain deformations. An example is a suite of meshless total Lagrangian explicit dynamics (MTLED) algorithms based on the total Lagrangian formulation of nonlinear solid mechanics and explicit time domain integration [57] developed by our research group (Intelligent Systems for Medicine Lab). The MTLED algorithm has been extensively evaluated in previous studies for computing soft tissue deformations [79]. However, it is very sophisticated and requires specialised knowledge of computational biomechanics and numerical methods to set up a simulation. MTLED uses a cloud of points to discretise the problem domain. It is comparatively easy to generate a biomechanical model with a cloud of points rather than a high-quality finite element mesh but defining boundary conditions and loading and assigning material properties to intra-cranial constituents are still required.

In this study, we created a framework to automate the workflow for generating a patient-specific brain biomechanical model and computing the intra-operative deformations using the MTLED algorithm. We implemented our framework as an extension, SlicerCBM (Computational Biophysics for Medicine in 3D Slicer), for the 3D Slicer medical imaging platform [10]. SlicerCBM is freely available from our GitHub repository (https://github.com/SlicerCBM/SlicerCBM). The framework computes brain deformations for three different neurosurgical brain shift scenarios: craniotomy-induced brain shift (due to opening of the skull), tumour resection-induced brain shift (due to removal of the tumour) and electrode placement-induced brain shift (due to placement of electrocorticography electrodes on the brain surface after craniotomy in epilepsy surgery). We evaluate our framework for predicting brain deformations for nine patients (Table 1) undergoing three different neurosurgical brain shift scenarios. The data for this study were obtained from the databases of the Surgical Planning Laboratory (SPL) at Brigham and Women’s Hospital, Computational Radiology Laboratory (CRL) at Boston Children’s Hospital and Montreal Neurological Institute’s Brain Images of Tumours for Evaluation [11].

Table 1.

Pre-operative (pre-op), intra-operative (intra-op) and post-operative (post-op) patient data analysed in this study

Case Application 3D image data type Slice thickness (mm)
1 Craniotomy Pre-op MRI and intra-op MRI 2.5
2 Craniotomy Pre-op MRI and intra-op MRI 2.5
3 Craniotomy Pre-op MRI and intra-op MRI 2.5
4 Tumour resection Pre-op MRI and intra-op MRI 2.2
5 Tumour resection Pre-op MRI and post-op MRI 4.0
6 Tumour resection Pre-op MRI and post-op MRI 2.0
7 Tumour resection Pre-op MRI and post-op MRI 2.0
8 Electrode placement Pre-op MRI and post-op CT with electrodes implanted 0.7
9 Electrode placement Pre-op MRI and post-op CT with electrodes implanted 1.0

Methods

Figure 1 describes the workflow of our framework for craniotomy-induced and electrode placement-induced brain shift, whereas Fig. 2 describes the workflow for tumour resection-induced brain shift. The developed framework modules corresponding to each component of the framework are discussed in Sects. "Patient-specific biomechanical model generation" to "Image warping ".

Fig. 1.

Fig. 1

Workflow of our framework for generating and solving a patient-specific model of craniotomy and electrode placement-induced brain shift scenarios, a craniotomy and electrode placement-induced brain shift, b patient-specific computational grid generation, c model solution using meshless total Lagrangian explicit dynamic (MTLED) algorithm and d image warping

Fig. 2.

Fig. 2

Workflow of our framework for generating and solving a patient-specific model of tumour resection-induced brain shift scenarios, a tumour resection-induced brain shift, b patient-specific computational grid generation, c patient-specific computational grid generation (with tumour cavity), d model solution using meshless total Lagrangian explicit dynamic (MTLED) algorithm and e image warping

Image pre-processing

We used the rigid registration algorithm [12] in the “GeneralRegistration” module of 3D Slicer to obtain the pre-operative brain anatomy in the intra-operative brain orientation. We automatically extracted the brain parenchyma (known as skull stripping) from the high-quality rigidly registered pre-operative MRI using the watershed algorithm of FreeSurfer (http://surfer.nmr.mgh.harvard.ed), an open-source software suite for analysing medical resonance images (MRIs) [13]. Following skull stripping, the cropped pre-operative MRI contains only the brain tissues, tumour and ventricles. To segment the tumours, we used the “GrowfromSeeds” feature of 3D Slicer’s built-in module “SegmentEditor”, which utilises the “FastGrowCut” algorithm to generate a tumour mask [10]. Generation of this tumour mask is automatic but may require corrections by an analyst. We used the tumour mask to locate the nodes and integration cells that represent a tumour within the brain (see Sect. "Computational grid generator").

Patient-specific biomechanical model generation

Computational grid generator

To discretise the problem domain, which is the brain parenchyma extracted from the pre-operative MRI, we used a cloud of points. We developed a patient-specific tetrahedral integration grid using our "ComputationalGridGenerator" module, which takes the cropped pre-operative MRI as input and automatically generates the integration grid (Figs. 2 and 3).

Fig. 3.

Fig. 3

Workflow for automatic patient-specific brain integration grid generation within our 3D Slicer module a pre-operative MRI after skull stripping, b brain mask generation using threshold, c brain surface model generation using marching cubes algorithm, d brain surface model triangulation (yellow) using Voronoi clustering algorithm (yellow line around brain surface model (green) represents the brain triangulation) and e 3D tetrahedral integration grid (yellow) generation using 3D Delaunay algorithm

The procedure implemented in our "ComputationalGridGenerator" module involves the following steps: first, it takes the pre-operative MRI after skull stripping and generates a brain mask using Kittler-Illingworth [14] thresholding algorithm. Next, it generates a brain surface model using the marching cubes algorithm [15]. Then, it generates a uniformly triangulated brain surface using the Voronoi clustering algorithm [16] of PyACVD (https://github.com/pyvista/pyacvd). Finally, it generates a tetrahedral grid using the 3D Delaunay algorithm of Gmsh [17]. To smooth the brain surface, we used the Laplacian filter [18] (Fig. 2). It is crucial to understand that the tetrahedral integration cells are not finite elements and do not have to adhere to the strict quality requirements of a finite element mesh. Table 2 lists the number of nodes, integration cells and integration points generated using our “ComputationalGridGenerator” module for all nine patients.

Table 2.

Summary of computational grids generated with respect to the patient-specific brain

Case No. of nodes No. of integration cells No. of integration points
1 33,273 141,935 567,740
2 40,767 169,026 676,104
3 49,195 210,196 840,784
4 22,507 119,170 119,170
5 24,675 129,486 129,486
6 26,189 136,825 136,825
7 23,961 126,417 126,417
8 33,363 136,477 545,908
9 21,788 55,470 221,880

To predict the tumour resection-induced brain shift, a computational grid of the brain with a tumour cavity is required. This grid is used to apply traction forces at the boundary of the tumour cavity, as described in our previous study [9]. To automate the construction of a brain computational grid with a tumour cavity, we developed the "TumourResectionAndBrainRemodelling" module (shown in Fig. 4). This module takes the brain computational grid and the tumour mask as inputs, and identifies the nodes within the tumour mask to generate a brain computational grid with a tumour cavity. The coordinates of these identified nodes are saved and used to construct the new brain computational grid with the tumour cavity.

Fig. 4.

Fig. 4

Procedure for generating a brain computational grid with tumour cavity as implemented in our module “TumourResectionAndBrainRemodelling”

Brain–skull contact interface

To account for the difference in stiffness between the skull and brain tissues, a frictionless sliding contact interface is defined between the rigid skull surface and the deformable brain model in neurosurgical brain shift scenarios. This approach prevents brain nodes from penetrating the skull while allowing the brain to slide along the inner surface of the skull [19].

To define the contacts automatically, we developed our module “SkullGenerator” to construct a skull surface model using the triangulated brain surface model generated in Sect. "Computational grid generator"; and to extract the brain surface nodes in contact with the skull surface model.

Loading

In craniotomy-induced and electrode placement-induced brain shift, loading is defined as prescribed displacements on the exposed part of the brain due to neurosurgical procedures. In tumour resection-induced brain shift, loading is defined as gravity forces. To define the load, information about the deformation of the exposed brain surface can be obtained using cameras or the pointing tool of a neurosurgical station [20]. In this study, we acquire such information using sparse intra-operative MRI. To define the prescribed loading, selection of the exposed surface area of the brain is an essential step. Our automated procedure for selecting brain surface nodes exposed due to craniotomy is implemented in the modules “CranGenerator” and “NodeSelector”, which streamlines the process of identifying loaded nodes. It comprises the following steps (Fig. 5): (1) auto-thresholding is used to select the patient’s head in pre-/intra-operative MRIs to create a pre-/intra-operative head mask, (2) wrap solidify effect is used to shrink wrap [10] and remove any gaps in pre-/intra-operative head masks generated in step 1, (3) Gaussian smoothing (3 mm) is used to smooth the created head masks, and Island filter [10] is used to remove small islands (1000 voxels), (4) logical operator (subtract) is used to create a craniotomy region mask, (5) marching cubes algorithm [15] is used to generate the craniotomy surface model, and (6) brain surface cells exposed due to craniotomy are selected using the craniotomy surface model from step 5, and finally, the brain surface nodes are selected.

Fig. 5.

Fig. 5

Procedure for automatically creating a craniotomy region and selecting brain surface nodes exposed due to craniotomy

To compute the prescribed displacements for the selected brain surface nodes, we use a procedure that involves several steps. Firstly, we extract sparse pre-operative and intra-operative MRI information, which we then use to compute the B-Spline transform using a rigid registration algorithm [12]. Secondly, we apply the B-Spline transform to the selected brain surface nodes that are exposed due to craniotomy, resulting in the position of the brain surface nodes in an intra-operative (deformed) brain configuration. Finally, we compute the prescribed displacements by calculating the difference between the coordinates of the brain surface nodes in the deformed brain configuration and those in the undeformed configuration. This procedure enables us to accurately determine the necessary displacement values for the nodes on the brain surface, which is crucial for simulating the deformation of the brain during neurosurgery.

For electrode placement-induced brain shift, we extracted the electrode locations (coordinates) from the computed tomography (CT) image using our electrode extraction procedure implemented as “ElectrodesToMarkups” module. The steps involved in our electrode extraction procedure are: (1) creating a binary label volume from binary CT image using PolySeg software library, (2) splitting the binary label volume into segments corresponding to each electrode using the “SplitIsland” filter and (3) adding a point (3D space) at the centroid of each segmented electrode using “SegmentStatistics” [10]. After extracting electrode locations from the CT image, prescribed displacements are computed using our automated procedure, which comprises the following steps (Fig. 6): (1) projection of electrodes on the undeformed brain surface extracted from pre-operative MRI, (2) creating the electrode sheet model (representing the silastic substrate of the electrocorticography electrode grid placed on the brain surface in epilepsy surgery) using the projected electrodes, (3) selecting brain surface nodes (known as loaded nodes) under the electrode sheet model and (4) computing prescribed displacements.

Fig. 6.

Fig. 6

Procedure for selecting brain surface nodes under electrode sheet and computing the prescribed displacements

In step 1, we projected the extracted electrodes onto the surface of the brain extracted from the pre-operative MRI using our “MarkUpsToDistance” module. This module determines the points corresponding to the location of electrodes (referred to as projected electrodes) in the undeformed (pre-operative) brain configuration. The module uses the “ImplicitPolyDataDistance” method of the Visualization Toolkit (VTK) [21] to compute the distance for each of the electrodes identified in the post-operative CT to its corresponding nearest triangle on the undeformed brain surface. We created projected electrode locations at the centroids of the identified nearest triangles on the undeformed brain surface (extracted from pre-operative MRI). In step 2, we used these projected electrode locations to create an electrode sheet model by means of the PolyData algorithm [22], implemented in our “SheetFromPoints” module. We uniformly triangulated the electrode surface sheet model using the PyACVD software library (https://github.com/pyvista/pyacvd) implemented in our module “SurfaceTriangulation”. In step 3, we used the vertices of each triangle of the electrode sheet model to select the corresponding brain surface cells (triangles) in the undeformed brain surface model using our “NodeSelector” module. We used the selected brain surface cells to select the corresponding nodes (vertices) of these selected brain surface cells. We applied prescribed displacements on the selected nodes of the selected triangles. In step 4, to compute prescribed displacements, the original and projected electrode coordinates were used as an input to the “ScatteredTransform” [23] module to compute a B-Spline transform. We applied the computed B-Spline transform to the undeformed brain surface nodes located under the electrode sheet to determine the position of the corresponding nodes in the deformed (due to electrode implantation) brain geometry. We computed the prescribed displacements as the difference between the coordinates of the corresponding brain surface nodes in undeformed and deformed brain geometry. The prescribed displacements were applied using a smooth (3-4-5 polynomial) loading curve [24].

In tumour resection-induced brain shift scenarios, we consider the load as a gravity force and calculate the internal forces acting at the interface nodes between the tumour and nearby healthy brain tissues. Once the tumour is removed from the biomechanical model, the reaction forces are applied in the opposite direction to the interface nodes. This approach allows us to simulate the deformation of the brain tissue caused by the tumour and its subsequent removal during surgery.

Assignment of material properties using fuzzy tissue classification

In patient-specific computational biomechanics modelling, the material properties are typically assigned using image segmentation [25, 26], where each image voxel is assigned to a specific brain tissue class using semi-automatic procedures. However, this process is time-consuming and clinically incompatible [25]. We used fuzzy tissue classification [27] to automatically assign material properties of intra-cranial constituents to integration points within the problem domain. To assign material properties to brain tissues, we used our “FuzzyClassification” module that takes a brain mask (see generated brain mask in Sect. "Computational grid generator"), pre-operative MRI and tumour mask (if present) as inputs and produces fuzzy classified brain tissue classes, which are used by our “MaterialPropertiesAssignment” module to automatically assign material properties to integration points corresponding to brain constituents.

For all nine case studies, we used a mass density of 1000 kg/m3 for all tissue types. Craniotomy and electrode placement-induced brain shift simulations correspond to a subclass of problems known as “displacement–zero traction” problems, where the load is defined by prescribing the displacement on the boundary, and we do not know anything about the deformation field within the analysed continuum. Problems of this type depend very weakly on the material properties and material model. Therefore, we used a neo-Hookean constitutive model, with initial Young’s modulus E, and initial Poisson’s ratio ν, listed in Table 3 [26].

Table 3.

Neo-Hookean material model parameters for each tissue type in the biomechanical brain model used for computing craniotomy and electrode placement-induced brain shift

Tissue type ρ (kg/m3) E (Pa) ν
Parenchyma 1000 3000 0.49
Tumour 1000 9000 0.49
Ventricle 1000 10 0.1

Poisson’s ratio is a mechanical property that describes the compressibility of a material. A low Poisson’s ratio suggests strong compressibility, whereas a high Poisson’s ratio of 0.5 indicates that the material is fully incompressible. We consider the parenchyma of the brain to be a nearly incompressible structure [28]. In the tumour resection-induced brain shift, since the load is due to gravity and traction forces, the computed deformations depend on the tissue “stiffness” as determined by the material properties and material model. Therefore, an Ogden constitutive model is used, with shear modulus µ, initial Poisson’s ratio ν and material parameter α, listed in Table 4 [29], because it adequately accounts for the brain tissue material properties under both tension and compression. The shear modulus for the tumour was assigned a value three times larger than that of healthy brain tissue [28].

Table 4.

Ogden material model parameters for different tissue types (CSF, parenchyma, tumour) in the biomechanical brain model used for computing brain shift due to tumour resection. Note that for α = 2 the Ogden model is similar to the neo-Hookean model

Tissue type µ (Pa) ν α
Parenchyma 842 0.49 − 4.7
Tumour 2526 0.49 − 4.7
CSF (case 4) 4.54 0.1 2
CSF (cases 5, 6, 7) 4.54 0.49 2

Model solution

To compute brain deformations using MTLED, we developed the “MTLEDSolver” module that uses the meshless total Lagrangian explicit dynamics (MTLED) algorithms [5]. The module predicts intra-operative deformations and generates a solution in the form of a deformed brain biomechanical model. The MTLED solution algorithm is described in detail in our previous studies [5, 7]. MTLED solves the weak form of the elasticity equations and can be used with different shape functions, including moving least squares (MLS) [5], modified moving least squares (MMLS) [7] and interpolating modified moving least squares (IMMLS) [30]. The methodology for computing brain deformations has been extensively validated in our previous studies [7, 8, 31]. We use IMMLS shape functions [30] as they accurately enforce the essential boundary conditions and provide robust computations for large deformations and strains.

Image warping

To perform image warping, we extracted undeformed and predicted deformed brain model nodal coordinates and used the “ScatteredTransform” module [23] to compute a B-Spline transform which is used to warp the pre-operative MRI to obtain the predicted intra-operative MRI.

Results

In this section, we apply our framework to solve three neurosurgical brain shift scenarios: craniotomy, tumour resection and electrode placement-induced brain shift.

Methods for evaluating predicted intra-operative deformations by our framework

We evaluated our framework qualitatively and quantitatively by analysing the predicted intra-operative MRI and the actual intra-operative MRI of nine patients. For qualitative evaluation, we visually compared the predicted brain contour with the actual intra-operative brain contour. For quantitative evaluation, following [26, 32], we use the Hausdorff distance (HD) to objectively measure the differences between the ventricle surfaces of the brain predicted by our framework using the MTLED algorithm and the ventricle surfaces obtained by segmentation of the actual intra-operative MRI.

The purpose of this study is to create a framework for automating the workflow for predicting intra-operative brain deformations rather than to conduct evaluation of the framework performance using patient cohort sufficiently large for comprehensive statistical analysis. We have made our open-source framework freely available through GitHub, which opens avenues for other research groups to use the framework and conduct its independent evaluation. In this study, we demonstrate the application of the framework by predicting intra-operative deformations in nine patients undergoing neurosurgical procedures. Given this relatively small cohort size, we conduct only rudimentary statistical analysis of the results by reporting the average and standard deviation of the percentage of successfully registered points/nodes (i.e. the nodes for which the registration error is lower than twice the in-plane resolution of the intra-operative image).

Craniotomy-induced brain shift

Qualitative evaluation

The pre-operative MRI was warped to obtain the predicted intra-operative MRI using the B-Spline transformation described in Sect. "Image warping" such that it corresponds to the actual intra-operative anatomy of the brain. We visually compared the brain contour predicted by our framework (from a warped pre-operative MRI) with the actual intra-operative MRI. The ventricle contours predicted by our automated framework (Fig. 7) for case studies 1, 2 and 3 are very close to the actual intra-operative ventricle contours.

Fig. 7.

Fig. 7

Intra-operative MRI overlaid with contours (red) of the deformed ventricle and brain extracted from the predicted intra-operative MRI which is obtained by warping the pre-operative MRI with the computed transform. Comparison of the brain contours (red) from the predicted intra-operative MRI along with the brain contours (green) extracted from the pre-operative MRI. Predicted red ventricle contours and intra-operative ventricle contours in yellow

Quantitative evaluation

We used the 95th, 75th, 50th and 25th percentile HD to measure the similarities between the actual ventricle surfaces (obtained from segmentation of actual pre-/post-operative MRIs) and the predicted ventricle surfaces (obtained from the segmentation of the predicted MRIs, see Table 5). The image resolution limits the precision of neurosurgical image guidance. Therefore, registration is considered successful if the 95% HD is lower than twice the actual in-plane resolution of the intra-operative MRI (2.5 mm, 1 mm and 2.5 mm for case studies 1, 2 and 3, respectively). For case studies 1, 2 and 3, about 96%, 98% and 99% of the nodes on the ventricle surfaces, respectively, were successfully registered (Fig. 8). The results obtained using our automated framework are very close to those reported in our previous studies [8, 26] (see Table 5). The mean 95th percentile Hausdorff distance between the ventricle surfaces for the three craniotomy-induced brain shift case studies is 1.9 mm with a standard deviation (SD) of 0.464 mm. This means that the overall agreement between the ventricles is reasonably good, with most of the points falling within one standard deviation of the mean.

Table 5.

Quantitative evaluation for craniotomy-induced brain shift. 95th, 75th, 50th and 25th percentile (millimetres) of HD between the predicted and actual ventricle surfaces. The 95% HD was utilised as the measure of registration error. The results are compared to finite element and MTLED results from our previous studies [8, 26]

Case H95 (mm) H75 (mm) H50 (mm) H25 (mm)
1 1.7 0.9 0.5 0.2
1 [32] 1.3 0.6 0.4 0.3
2 1.5 0.9 0.5 0.2
2 [32] 2.8 1.2 0.8 0.4
2 [10] 1.4 N/A N/A N/A
3 2.5 0.6 0.3 0.2
3 [32] 1.9 1.1 0.6 0.4
Fig. 8.

Fig. 8

Hausdorff distance between predicted and actual intra-operative ventricles at different percentiles. The in-plane resolution of the intra-operative image for all patients is indicated by the red line. a For patient 1, the acceptable registration error is 2.5 mm, which corresponds to 96-percentile HD, b for patient 2, the acceptable registration error is 1 mm, which corresponds to 98-percentile HD, and c for patient 3, the acceptable registration error is 2.5 mm, corresponds to 99-percentile HD

Tumour resection-induced brain shift

Qualitative evaluation

For case study 4, the predicted intra-operative brain contour extracted from the predicted intra-operative MRIs was compared to the actual intra-operative MRI brain contour (Fig. 9). Likewise, we qualitatively evaluated our framework’s predicted contours of the brain parenchyma extracted from predicted post-operative MRIs for case studies 5, 6 and 7 to the actual brain contours extracted from the actual post-operative MRI (Fig. 9). The predicted maximum displacement observed in case studies 4, 5, 6 and 7, was 11 mm, 7 mm, 7.2 mm and 6.5 mm, respectively.

Fig. 9.

Fig. 9

Intra-operative (case 4) and post-operative (cases 5, 6 and 7) MRIs overlaid with brain and tumour contours. The yellow in the tumour region denotes the pre-operative tumour cavity, whereas the green denotes the true intra-operative tumour cavity in case 4 and the post-operative tumour cavity in cases 5, 6 and 7. For the brain contours, yellow denotes pre-operative brain contour, green represents intra-operative brain contour for case 4 and post-operative brain contour for cases 5, 6 and 7, and red denotes predicted brain contour

Quantitative evaluation

We used the 95th, 75th, 50th and 25th percentile HD to measure the similarities between the actual ventricle and the predicted ventricle surfaces (Table 6). Registration is considered successful if the 95% HD is lower than twice the actual in-plane resolution of the intra-operative MRI (2.4 mm, 2 mm, 4 mm and 2 mm for case studies 4, 5, 6 and 7, respectively). For case study 4, about 77% of the nodes on the ventricle surfaces were successfully registered. For case studies 5, 6 and 7, about 92%, 99% and 89% of the nodes on the ventricle surfaces, respectively, were successfully registered (Fig. 10). The mean 95th percentile Hausdorff distance between the ventricle surfaces for the four tumour resection-induced brain shift case studies is 3.1 mm (SD = 0.842 mm). This shows that the overall agreement between the ventricles is reasonably good, with most points falling within one standard deviation of the mean. However, the slightly higher values of mean HD indicate that the tumour resection-induced brain shift is more difficult to compensate for than craniotomy-induced brain shift.

Table 6.

Quantitative evaluation for tumour resection-induced brain shift. 95th, 75th, 50th and 25th percentile (millimetres) of HD between the predicted and actual ventricle surfaces

Case H95 (mm) H75 (mm) H50 (mm) H25 (mm)
4 4.10 2.29 1.27 0.58
5 2.67 1.15 0.62 0.27
6 2.34 1.26 0.68 0.33
7 3.44 1.01 0.54 0.25
Fig. 10.

Fig. 10

Hausdorff distance between predicted and actual intra-operative ventricles at different percentiles. The in-plane resolution of the intra-operative image for all patients is indicated by the red line. a For patient 4, the acceptable registration error is 2.4 mm, corresponding to 78-percentile HD, b for patient 5, the acceptable registration error is 2 mm, corresponding to 92-percentile HD, c for patient 6, the acceptable registration error is 4 mm, corresponding to 99-percentile HD, and d for patient 7, the acceptable registration error is 2 mm, corresponding to 89-percentile HD

Electrode placement-induced brain shift

The predicted maximum displacement in case studies 8 and 9 was 11.7 mm and 21.5 mm, respectively. Using the deformation field predicted by our framework, we warped the pre-operative MRI to obtain the corresponding brain configuration with electrodes implanted. We used the “Scattered Transform” module [23] to obtain the transform for image warping. Figure 11 shows the computed deformation field of case 8 (Fig. 11a) and case 9 (Fig. 11b). Figure 11 shows the transforms used to warp the pre-operative MRI of case 8 (Fig. 12a) and case 9 (Fig. 12b). The results of the registration are shown in Fig. 13a for case 8 and in Fig. 13b for case 9.

Fig. 11.

Fig. 11

Visualisation of deformation field computed using our automated framework for cases 8 and 9

Fig. 12.

Fig. 12

Visualisation of pre-operative image transformation for cases 8 and 9 using deformation field from Fig. 10a and b, respectively, and predicted deformed brain model surface (red line) overlaid with predicted image

Fig. 13.

Fig. 13

Visualisation of predicted intra-operative MRIs for case 8 and case 9 registered on CT with implanted intra-cranial electrodes along with predicted deformed brain model surface (red line)

Computational efficiency

The simulations were performed on an HP Pro-Book laptop with an Intel Core i7 (2.7 GHz) processor and 8 GB physical memory. The time required to automatically generate a patient-specific brain biomechanical model using our framework was less than 3 min for each case. However, in tumour resection, there is an additional step of the construction of a brain model with a tumour cavity, which takes approximately 20 min. The solution to the biomechanical models ranged from 13 to 23 min.

Discussion and conclusion

We developed a framework to automatically generate a brain biomechanical model and compute intra-operative brain deformations. Our framework, SlicerCBM, is implemented as an extension in 3D Slicer, freely open-source software, and contains modules that can be used in combination to solve three neurosurgical brain shift scenarios: craniotomy, tumour resection and electrode placement-induced brain shift. The main modules of the framework are “ComputationalGridGenerator” to generate a patient-specific computational grid, “CranGenerator” to create a craniotomy model, “SurfaceTriangulation” to generate a uniformly triangulated surface (craniotomy and electrode sheet), “ElectrodeToMarkups” to extract the original electrode locations from CT, “MarkUpsToDistance” to create the projected electrode locations on the undeformed brain surface, “SheetFromPoints” to generate an electrode sheet model, “NodeSelector” to select the exposed brain surface due to a neurosurgical procedure, “DisplacementLoading” to compute loading, “SkullGenerator” to define the boundary conditions, “FuzzyClassification” and “MaterialPropertiesAssignment” to assign material properties to intra-cranial constituents and “MTLEDSolver” to compute brain deformations. These modules uniquely combine various algorithms working behind 3D Slicer modules and open-source software libraries. The “MTLEDSolver” module integrates our MTLED algorithm to provide an interface to this robust and efficient solution algorithm.

We evaluated the accuracy of our framework by performing nine simulations belonging to three neurosurgical brain shift scenarios. For craniotomy and tumour resection, the actual ventricle contours (yellow) and the ventricle contours predicted by our framework (red) show good similarity (Figs. 7 and 9). The 95% HD for ventricles surfaces for all case studies is less than two times the original in-plane resolution of the intra-operative MRI, which confirms successful registration. The 95% HD of the ventricle surfaces between the predicted and actual intra-operative MRIs for case study 2, between the results produced by our automated framework and the results obtained in our previous studies [8, 26], is less than 0.1 mm. The results obtained using our automated framework are very close to those reported in our previous studies [8, 26].

Our framework needs further verification against large cohort patient studies. Furthermore, the quantitative evaluation of displacements for electrode placement-induced brain shift was not possible due to the lack of intra-operative MRI data, as MRIs with electrodes implanted within the brain cannot be obtained for patient safety reasons. Our framework has significant potential for clinical applications. Qualitative and quantitative comparisons of ventricle surfaces in predicted and intra-operative MRIs for craniotomy and tumour resection-induced brain shift, and qualitative comparisons of brain contours for electrode placement-induced brain shift, lead us to conclude that the results are accurate enough to be useful in clinical applications because the accuracy of the results that we obtained for all case studies is within the limits typically required in image-guided surgery [33].

Acknowledgments

This work was supported in part by the National Health and Medical Research Council (NHMRC) Project Grants APP1144519 and APP1162030, Australian Research Council (ARC) Discovery Project Grants DP230100949 and DP160100714, National Institutes of Health (NIH) Grants R01EB027134, P41EB028741, R01EB032387, P41EB015902 (NAC), P41EB028741 (AT-NCIGT) and R01CA235589 (LNQ), and National Cancer Data Ecosystem, Task Order No. 413 HHSN26110071 under Contract No. HHSN261201500003I. The first author is a recipient of the University Post-graduate Award (UPA) at The University of Western Australia.

Funding

Open Access funding enabled and organized by CAUL and its Member Institutions.

Code availability

The software developed as part of this study is bundled as the SlicerCBM extension for 3D Slicer and is freely available from our GitHub repository (https://github.com/SlicerCBM/SlicerCBM).

Declarations

Conflict of interest

All the authors declare that they have no conflict of interest.

Informed consent

There was no informed consent required for the work reported in this manuscript.

Footnotes

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Shah MN, Leonard JR, Inder G, Gao F, Geske M, Haydon DH, Omodon ME, Evans J, Morales D, Dacey RG. Intraoperative magnetic resonance imaging to reduce the rate of early reoperation for lesion resection in pediatric neurosurgery. J Neurosurg Pediatr. 2012;9(3):259–264. doi: 10.3171/2011.12.PEDS11227. [DOI] [PubMed] [Google Scholar]
  • 2.Giordano M, Samii A, McLean ACL, Bertalanffy H, Fahlbusch R, Samii M, Di Rocco C. Intraoperative magnetic resonance imaging in pediatric neurosurgery: safety and utility. J Neurosurg Pediatr. 2017;19(1):77–84. doi: 10.3171/2016.8.PEDS15708. [DOI] [PubMed] [Google Scholar]
  • 3.Miller K, Wittek A, Joldes G. Biomechanics of the brain for computer-integrated surgery. Acta Bioeng Biomech. 2010;12(2):25–37. [PubMed] [Google Scholar]
  • 4.Joldes GR, Wittek A, Miller K. Suite of finite element algorithms for accurate computation of soft tissue deformation for surgical simulation. Med Image Anal. 2009;13(6):912–919. doi: 10.1016/j.media.2008.12.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Horton A, Wittek A, Joldes GR, Miller K. A meshless Total Lagrangian explicit dynamics algorithm for surgical simulation. Int J Numer Methods Biomed Eng. 2010;26(8):977–998. doi: 10.1002/cnm.1374. [DOI] [Google Scholar]
  • 6.Zhang GY, Wittek A, Joldes GR, Jin X, Miller K. A three-dimensional nonlinear meshfree algorithm for simulating mechanical responses of soft tissue. Eng Anal Bound Elem. 2014;42:60–66. doi: 10.1016/j.enganabound.2013.08.014. [DOI] [Google Scholar]
  • 7.Joldes G, Bourantas G, Zwick B, Chowdhury H, Wittek A, Agrawal S, Mountris K, Hyde D, Warfield SK, Miller K. Suite of meshless algorithms for accurate computation of soft tissue deformation for surgical simulation. Med Image Anal. 2019;56:152–171. doi: 10.1016/j.media.2019.06.004. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Miller K, Horton A, Joldes GR, Wittek A. Beyond finite elements: a comprehensive, patient-specific neurosurgical simulation utilizing a meshless method. J Biomech. 2012;45(15):2698–2701. doi: 10.1016/j.jbiomech.2012.07.031. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Yu Y, Bourantas G, Zwick B, Joldes G, Kapur T, Frisken S, Kikinis R, Nabavi A, Golby A, Wittek A. Computer simulation of tumour resection-induced brain deformation by a meshless approach. Int J Numer Methods Biomed Eng. 2022;38(1):e3539. doi: 10.1002/cnm.3539. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Fedorov A, Beichel R, Kalpathy-Cramer J, Finet J, Fillion-Robin J-C, Pujol S, Bauer C, Jennings D, Fennessy F, Sonka M. 3D slicer as an image computing platform for the quantitative imaging network. Magn Reson Imaging. 2012;30(9):1323–1341. doi: 10.1016/j.mri.2012.05.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Mercier L, Del Maestro RF, Petrecca K, Araujo D, Haegelen C, Collins DL. Online database of clinical MR and ultrasound images of brain tumors. Med Phys. 2012;39:3253–3261. doi: 10.1118/1.4709600. [DOI] [PubMed] [Google Scholar]
  • 12.Mattes D, Haynor DR, Vesselle H, Lewellen TK, Eubank W. PET-CT image registration in the chest using free-form deformations. IEEE Trans Med Imaging. 2003;22(1):120–128. doi: 10.1109/TMI.2003.809072. [DOI] [PubMed] [Google Scholar]
  • 13.Ségonne F, Dale AM, Busa E, Glessner M, Salat D, Hahn HK, Fischl B. A hybrid approach to the skull stripping problem in MRI. Neuroimage. 2004;22(3):1060–1075. doi: 10.1016/j.neuroimage.2004.03.032. [DOI] [PubMed] [Google Scholar]
  • 14.Kittler J, Illingworth J. Minimum error thresholding. Pattern Recogn. 1986;19(1):41–47. doi: 10.1016/0031-3203(86)90030-0. [DOI] [Google Scholar]
  • 15.Lorensen WE, Cline HE. Marching cubes: a high resolution 3D surface construction algorithm. ACM Siggraph Comput Graph. 1987;21(4):163–169. doi: 10.1145/37402.37422. [DOI] [Google Scholar]
  • 16.Valette S, Chassery JM, Prost R. Generic remeshing of 3D triangular meshes with metric-dependent discrete Voronoi diagrams. IEEE Trans Visual Comput Graph. 2008;14(2):369–381. doi: 10.1109/TVCG.2007.70430. [DOI] [PubMed] [Google Scholar]
  • 17.Geuzaine C, Remacle JF. Gmsh: a 3-D finite element mesh generator with built-in pre-and post-processing facilities. Int J Numer Meth Eng. 2009;79(11):1309–1331. doi: 10.1002/nme.2579. [DOI] [Google Scholar]
  • 18.Sorkine O, Cohen-Or D, Lipman Y, Alexa M, Rössl C, Seidel HP (Eds) (2004) Laplacian surface editing. In: Proceedings of the 2004 Eurographics/ACM SIGGRAPH symposium on Geometry processing
  • 19.Joldes GR, Wittek A, Miller K, Morriss L (Eds) (2008) Realistic and efficient brain-skull interaction model for brain shift computation. Computational Biomechanics for Medicine III Workshop, MICCAI
  • 20.Miga MI, Sun K, Chen I, Clements LW, Pheiffer TS, Simpson AL, Thompson RC. Clinical evaluation of a model-updated image-guidance approach to brain shift compensation: experience in 16 cases. Int J Comput Assist Radiol Surg. 2016;11(8):1467–1474. doi: 10.1007/s11548-015-1295-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Schroeder W, Martin KM, Lorensen WE. The visualization toolkit an object-oriented approach to 3D graphics. Prentice-Hall Inc; 1998. [Google Scholar]
  • 22.Sullivan C, Kaszynski A. PyVista: 3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK) J Open Source Softw. 2019;4(37):1450. doi: 10.21105/joss.01450. [DOI] [Google Scholar]
  • 23.Joldes GR, Wittek A, Miller K. Stable time step estimates for mesh-free particle methods. Int J Numer Meth Eng. 2012;91(4):450–456. doi: 10.1002/nme.4290. [DOI] [Google Scholar]
  • 24.Waldron KJ, Kinzel GL, Agrawal SK. Kinematics, dynamics, and design of machinery. Wiley; 2016. [Google Scholar]
  • 25.Drakopoulos F, Tsolakis C, Angelopoulos A, Liu Y, Yao C, Kavazidi KR, Foroglou N, Fedorov A, Frisken S, Kikinis R. Adaptive physics-based non-rigid registration for immersive image-guided neuronavigation systems. Front Digit Health. 2021;2:613608. doi: 10.3389/fdgth.2020.613608. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Wittek A, Joldes G, Couton M, Warfield SK, Miller K. Patient-specific non-linear finite element modelling for predicting soft organ deformation in real-time; application to non-rigid neuroimage registration. Prog Biophys Mol Biol. 2010;103(2–3):292–303. doi: 10.1016/j.pbiomolbio.2010.09.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Zhang JY, Joldes GR, Wittek A, Miller K. Patient-specific computational biomechanics of the brain without segmentation and meshing. Int J Numer Methods Biomed Eng. 2013;29(2):293–308. doi: 10.1002/cnm.2507. [DOI] [PubMed] [Google Scholar]
  • 28.Miller K, Joldes GR, Bourantas G, Warfield SK, Hyde DE, Kikinis R, Wittek A. Biomechanical modeling and computer simulation of the brain during neurosurgery. Int J Numer Methods Biomed Eng. 2019;35(10):e3250. doi: 10.1002/cnm.3250. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Miller K, Chinzei K. Mechanical properties of brain tissue in tension. J Biomech. 2002;35(4):483–490. doi: 10.1016/S0021-9290(01)00234-2. [DOI] [PubMed] [Google Scholar]
  • 30.Bourantas G, Zwick BF, Joldes GR, Wittek A, Miller K. Simple and robust element-free Galerkin method with almost interpolating shape functions for finite deformation elasticity. Appl Math Model. 2021;96:284–303. doi: 10.1016/j.apm.2021.03.007. [DOI] [Google Scholar]
  • 31.Garlapati RR, Roy A, Joldes GR, Wittek A, Mostayed A, Doyle B, Warfield SK, Kikinis R, Knuckey N, Bunt S. More accurate neuronavigation data provided by biomechanical modeling instead of rigid registration. J Neurosurg. 2014;120(6):1477–1483. doi: 10.3171/2013.12.JNS131165. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Oguro S, Tuncali K, Elhawary H, Morrison PR, Hata N, Silverman SG. Image registration of pre-procedural MRI and intra-procedural CT images to aid CT-guided percutaneous cryoablation of renal tumors. Int J Comput Assist Radiol Surg. 2011;6(1):111–117. doi: 10.1007/s11548-010-0485-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Warfield SK, Haker SJ, Talos I-F, Kemper CA, Weisenfeld N, Mewes AUJ, Goldberg-Zimring D, Zou KH, Westin C-F, Wells WM. Capturing intraoperative deformations: research experience at Brigham and Women’s Hospital. Med Image Anal. 2005;9(2):145–162. doi: 10.1016/j.media.2004.11.005. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The software developed as part of this study is bundled as the SlicerCBM extension for 3D Slicer and is freely available from our GitHub repository (https://github.com/SlicerCBM/SlicerCBM).


Articles from International Journal of Computer Assisted Radiology and Surgery are provided here courtesy of Springer

RESOURCES