1 Introduction

Cryosurgery is a treatment of tumors using hypothermia introduced in the 1960s [7]. The percutaneous ablation of a tumor consist of percutaneously inserting one or more cryoprobes under CT, MR or ultrasound guidance to kill cancerous cells by extreme cold. The process generates alternating cycles of freezing and thawing by decompressing a gas through the needle tip, forming an iceball around it [5]. The recommended lethal freezing temperature is between 0 \(^{\circ }\)C to −50 \(^{\circ }\)C [10].

Percutaneous cryoablation has become popular, as it shortens the hospital stay and is reproducible. However, the uncertainty of its final result is a limitation in many applications [9]. The volume of iceball should cover the entire tumor shape with an additional margin to ensure the complete ablation of the lesion. In the context of cryoablation planning, an accurate simulation of the iceball formation is essential. However, simulating an iceball generated from multiple needles and taking into account various factors, i.e., the surrounding anatomy or the injection of protective heated fluid, is very complex and difficult to anticipate accurately. In addition, the synergistic effect created by several probes depends on their actual location and influences the final shape of the iceball [1].

Previous papers described representations of iceballs in gel, either based on simplified computational models [9] or measurements [12]. Ge et al. described a soft tissue parametrization model of the iceball without validating it on real data [6]. Talbot et al. describes a GPU-based algorithm to model iceballs [14]. None of these models take into account the heating effect of large blood vessels. More recent papers describe more elaborated methods that account for the influence of blood vessels in radio-frequency ablation (RFA), which is another type of hypothermia [8, 13]. In [11], Rieder et al. proposed a GPU-based algorithm using a simplified approximated model based on a weighted distance field to compute RFA. This approach allows for real-time computation of the thermal ablation volume. These models proposed in the three cited works are limited to a single active needle and have not been validated on actual cryoablation data.

In this paper, we present a three dimensional (3D) finite difference model and simulation of heat transfer for cryoablation. The novelty of our approach is that it simulates the iceball creation taking into account large blood vessels and multiple cryoablation needles using a fast GPU-based algorithm. To validate our approach, we compared our results to two kinds of ground truth: temperature measurements reported in [12] for a gel with known properties, and retrospective images of the cryoablation of a renal tumor close to large blood vessels. Our simulation uses parameters of the human tissues and includes metabolic heat.

2 Materials and Methods

2.1 General Formulation

The general heat equation describes the distribution of heat over time t in a region defined in an xy and z Cartesian coordinate system [3]. The heat propagation is described by a partial differential equation:

$$\begin{aligned} C \frac{\partial T}{ \partial t} = \frac{\partial }{\partial x} ( K_{x} \frac{\partial T}{\partial x} ) + \frac{\partial }{\partial y} ( K_{y} \frac{\partial T}{\partial y} ) + \frac{\partial }{\partial x} ( K_{z} \frac{\partial T}{\partial z} ) + I(x,y,z,t) \end{aligned}$$
(1)

where I is the internal heat generation function, t is the time, constants K denote the spatial thermal conductivities in xyz, and C denotes the heat capacity.

This formulation can be approximated by a discretization in which \(\varDelta x = \varDelta y = \varDelta z\) are the spacings between a cell (ijk) and its neighbours in the xyz directions, respectively. This discrete approximation of heat conduction is then:

$$\begin{aligned} T^{new}_{i,j,k} = T_{i,j,k} + \frac{\varDelta t. \beta }{ C_{i,j,k} (\varDelta x)^3} . H_{i,j,k} \end{aligned}$$
(2)

where \(C_{i,j,k}\) is the volumetric heat capacity. The new temperature \(T^{new}_{i,j,k}\) after a time step \(\varDelta t\) is computed by adding its previous temperature \(T_{i,j,k}\) and the coefficient of heat flow \(H_{i,j,k}\). The relaxation factor \(\beta \) should be chosen within the range [1, 2]. In this study \(\beta \) was set to 1.95.

The resulting heat flow \(H_{i,j,k}\) is computed from six neighbouring cells:

$$\begin{aligned} \begin{aligned} H_{i,j,k} = \kappa _{i-\frac{1}{2},j,k} . (T_{i-1,j,k} - T_{i,j,k}) + \kappa _{i+\frac{1}{2},j,k} . (T_{i+1,j,k} - T_{i,j,k)}&\\ + \kappa _{i,j-\frac{1}{2},k} . (T_{i,j-1,k} - T_{i,j,k}) + \kappa _{i,j+\frac{1}{2},k} . (T_{i,j+1,k} - T_{i,j,k)}&\\ +\kappa _{i,j,k-\frac{1}{2}} . (T_{i,j,k-1} - T_{i,j,k}) + \kappa _{i,j,k+\frac{1}{2}} . (T_{i,j,k+1} - T_{i,j,k)}&\end{aligned} \end{aligned}$$
(3)

The \(\kappa _{i-\frac{1}{2},j,k}\), \(\kappa _{i,j-\frac{1}{2},k}\), \(\kappa _{i,j,k-\frac{1}{2}}\) are the thermal conductances between cell (ijk) and the prior adjacent cells in the xyz directions, respectively. Similarly, \(\kappa _{i+\frac{1}{2},j,k}\), \(\kappa _{i,j+\frac{1}{2},k}\), \(\kappa _{i,j,k+\frac{1}{2}}\) are the conductances between cell (ijk) and posterior adjacent cells as in [3]. Thermal conductance of \(\kappa _{i,j,k+\frac{1}{2}}\) is defined by:

$$\begin{aligned} \kappa _{i,j,k+\frac{1}{2}} = \frac{\varDelta x}{1/(2K_{i,j,k}) + 1/(2K_{i,j,k+1}) + R_{i,j,k+\frac{1}{2}}} \end{aligned}$$
(4)

where \(K_{i,j,k}\) and \(K_{i,j,k+1}\) are the thermal conductivities of the current cell (ijk) and its adjacent cell \((i,j,k+1)\). The other five \(\kappa \) values in Eq. (3) are obtained similarly. The thermal resistance between these cells is denoted by \(R_{i,j,k+\frac{1}{2}}\). Since the thermal resistance has a very small impact on heating flows, we do not take it into account any further.

To avoid the numerical instability in heat transform equation, the time step \(\varDelta t\) is set to 0.05 s which satisfies the following stability criterion:

$$\begin{aligned} \varDelta t < \frac{C_{i,j,k}(\varDelta x)^3}{\varSigma \kappa } , \forall i,j,k \end{aligned}$$
(5)
$$\begin{aligned} \varSigma \kappa = \kappa _{i-\frac{1}{2},j,k} + \kappa _{i+\frac{1}{2},j,k} + \kappa _{i,j-\frac{1}{2},k} + \kappa _{i,j+\frac{1}{2},k} + \kappa _{i,j,k-\frac{1}{2}} + \kappa _{i,j,k+\frac{1}{2}} \end{aligned}$$
(6)

To simulate the growth of the iceball, the 3D heat propagation is computed iteratively within a grid of voxels centered at the needle tip inside a 10 \(\times \) 10 \(\times \) 10 cm cube. To obtain accurate results, a very fine grid is required, but this sharply increases the computation time. In this study, we use a grid resolution of \(\varDelta x = \varDelta y = \varDelta z = 1\) mm, which is smaller than the diameter of the thinnest needle (IceRod by Galil Medical, diameter 1.5 mm).

Voxels located in the active part of the cryoablation needles are labeled as the source of cold; their temperature is kept constant during the freezing cycles. Boundary conditions are represented by the voxels at the border of the cube, which are forced to the temperature of the environment. The algorithm was implemented on a GPU to reduce computation time incurred by a finely discretized cube. We use CUDA toolkit for NVidia’s GPUs and the method described in [2] to optimally use the parallelization capabilities of the GPU processing units and to avoid the repeated computation by two threads on the same heat cell.

2.2 Propagation of Cold in the Human Body Near Heating Sources

When the iceball is created inside the human body, the metabolic heat influences its creation and final shape. To account for metabolic heat, Pennes bioheat equation as described in Eq.(1), can be expressed as:

$$\begin{aligned} C \frac{\partial T}{ \partial t} = \frac{\partial }{\partial x} ( K_{x} \frac{\partial T}{\partial x} ) + \frac{\partial }{\partial y} ( K_{y} \frac{\partial T}{\partial y} ) + \frac{\partial }{\partial x} ( K_{z} \frac{\partial T}{\partial z} ) + C_b \omega _b (T_a - T_t) + Q_m \end{aligned}$$
(7)

where \(C_b\) denotes the heat capacity of blood, \(\omega _b\) is the blood perfusion rate, \(T_a\) is the arterial temperature, \(T_t\) is the temperature at time t, and \(Q_m\) is the metabolic heat rate of tissue. When a major vessel or any heating source, e.g., injected warm protective liquid, is inside the cube, their associated voxels are labeled and their temperature is kept constant and equal to the source temperature. In this study we consider all sources of heat as constant and homogeneous.

2.3 Validation in Silico

We first validated the simulation with an in silico study using gel properties. The goal was to measure the performance of our simulation approach in terms of accuracy and computation times in theoretical conditions. We simulated the propagation of cold with 1 to 4 evenly spaced cryoprobes arranged in parallel at 20 mm intervals. The experiment was done using two types of cryoprobes from Galil Medical: IceEdge 2.4 mm (10G) and IceRod 1.5 mm (17G).

Each experiment consists in simulating 3 cycles: 10 min of freezing, followed by 5 min of passive thaw, and 10 min of freezing. We used the parameters provided by the manufacturer to model the action of the probes. For IceEdge, the freezing temperature at probe’s tip was set to −138.0 \(^{\circ }\)C . The length of the active freezing part of the probe was set to 28 mm at 5.2 mm from the tip. For IceRod, we used a freezing temperature of −119.4 \(^{\circ }\)C . We set the active freezing part to 31 mm at 4.2 mm from the tip.

For all settings, we measured the diameter of the resulting 0 \(^{\circ }\)C, −20 \(^{\circ }\)C and −40 \(^{\circ }\)C isotherm surfaces at their largest sections. We then compared our simulation results with the dimensions of the isotherm surfaces measured in a recent study [12], where a thermocouple matrix structure was designed to measure the iceball temperatures in ultrasound (US) gel at 37 \(^{\circ }C\). To obtain the same conditions, we used the thermophysical properties of a similar gel described in [4].

2.4 Validation on Intraoperative MRI Images

We performed a second experiment on retrospective MR images of an actual renal cryoablation procedure where the tumor was located close to major vessels. During the procedure, warm saline solution was injected to protect sensitive structures nearby from being frozen.

The tumor was located on the upper right part of the kidney, close to major blood vessels. Four IceRod needles were inserted. This time, cryoablation was performed in four cycles: 10 min of active freezing, followed by 9 min of passive thawing and 1 min of active thawing and again 10 min active freezing. The 10 mn active freezing temperature of IceRod was set to −138.0 \(^{\circ }\)C while 1 mn active thawing temperature was set to 58.0 \(^{\circ }\)C. During the whole process, dissection water at 37.0 \(^{\circ }\)C was continuously injected around the kidney.

MR images of \(256\times 232\times 25\) voxels with a \(1.5\times 1.5\times 5\) mm\(^3\) voxel size were acquired during the procedure at three stages: (1) before cryoablation, (2) after 10 min of freezing, and (3) at the end of the cryosurgery. The segmentation of all structures of interest was particularly challenging, due to the injection of saline solution between preoperative and intraoperative images, that cause a deformation of the internal organs.

We first registered the preoperative MR image to the intraoperative MR image using interactive deformable point-based registration. Then, on the registered preoperative MR image, we interactively segmented the kidney and the tumor. On the intraoperative MR images, we segmented the injected saline solution, the renal vessels (vein and artery), and the iceballs at different stages, i.e. after the first and the second freezing cycles as a ground truth. Note that during a cryoablation procedure, the iceball (less than 0 \(^{\circ }\)C) appears as a black hole in the MR image. We also segmented the four probes, and used their position as an input to reproduce the same setup in our simulation. Both segmentation and registration were performed under the supervision of an experienced radiologist.

Next, a simulation was performed with commonly used soft tissue parameters accounting for frozen/unfrozen state [6]. To measure the accuracy of our modeling, the Hausdorff distance and the Dice coefficient were computed to compare the similarity of the segmented and simulated iceballs.

Fig. 1.
figure 1

Heat propagation simulation after complete process for 1 to 4 IceEdge probes evenly spaced by 20 mm. The largest sections of the iceballs in probe’s axis are represented. The colormap is within the range [−138.0 \(^{\circ }\)C, 37 \(^{\circ }\)C]

3 Results

The results of our experiment with gel parameters are shown on Fig. 1. Table 1 summarizes the maximum diameters of ground truth isotherm surfaces at 0 \(^{\circ }\)C, −20 \(^{\circ }\)C and −40 \(^{\circ }\)C (from [12]) and our simulated iceballs, for both the IceRod and the IceEdge probe models. The results of the simulation are very close to the measurements, with a mean error of 0.28 mm, i.e. 5.8% of the diameter of the reference iceball. This has to be put into perspective with the configuration of the multi-needle thermocouple matrix structure used in [12], which was designed with a minimum spacing of 0.5 cm between measuring thermocouples, being a potential source of a slight inaccuracy.

Table 1. Maximum diameters (cm) of ground truth and simulated iceballs

The results were obtained using a desktop computer equipped with a core-i7 3.40 GHz CPU with 16 Gb RAM and a GeForce GTX-1060 GPU with 6 GB memory. The computation times of the simulation in CPU single thread and GPU implementations were 540 s and 84 s for a computation within a 10 \(\times \) 10 \(\times \) 10 cm cube. GPU implementation was 6.4\(\times \) faster than with the CPU.

The results of the second experimentation are presented in Figs. 2 and 3, where the segmented iceball is in white, and our simulated iceball is in red. The dark blue mesh is a portion of the vascular structure, and the light blue mesh is the segmented saline solution. As we can see, the simulated iceball nicely fits around the vessels and is also deformed by the saline solution.

Fig. 2.
figure 2

Simulation of the iceball after the first freezing cycle displayed on 2 slices of a preoperative MRI. The segmented iceball is in white, simulated iceball is in red, vascular structure is in dark blue, segmented saline solution is in light blue.

On Fig. 3 right, we show the simulated iceball in red, compared to the theoretical ellipsoidal iceballs in yellow. We can observe that the synergistic effect and the influence of the vessels and saline solution provide a completely different shape. This emphasizes the essential interest of such a simulation for cryoablation planning. The actual iceball differs significantly from theoretical ellipsoids and is smaller, which could lead to an insufficient ablation of cancerous cells.

Fig. 3.
figure 3

Left: 3D mesh of the segmented (white) and simulated (red) iceballs after the first freezing cycle. Vessels are in dark blue, saline solution in light blue. Right: simulated iceball (red) and theoretical ellipsoids (yellow).

In terms of accuracy, we obtained a Hausdorff distance of 7.98 mm between segmented and simulated iceball meshes, and a Dice coefficient of 0.83 after the first freezing cycle. At the end of the process, the Hausdorff distance is 8.12 mm and Dice coefficient is 0.82. These measurements show a promising similarity between the two shapes. However, this comparison is subjected to the possible errors in the manual segmentations which can introduce inaccuracies.

Finally, the computation times were for the first freezing cycle 205 s. for CPU and 38 s. for GPU respectively, and for the complete process 664 s. for CPU and 110 s. for GPU. As for the first experiment, the GPU implementation sped up the computation by approximately 6 times. Let us note that the computation time does not depend on the complexity of the scene or the number of heating structures. It only depends on the size of the cube and the duration of the simulated process. When using a small number of needles, or needle models producing small iceballs, it is possible to reduce significantly the computation times by reducing the size of the cube. As an example, a cube of 7 \(\times \) 7 \(\times \) 7 cm would use only 1/3 of the time to compute (around 40 s).

4 Conclusion

We presented a fast computation approach for the simulation of iceballs created from multiple needles during cryosurgery in presence of heating sources such as blood vessels. These preliminary validation results on real patient images showed that it was possible to reach a good accuracy within a time compatible with preoperative planning, either interactive or automatic. Such a simulation coupled with a planner could help to find the best number of required probes. In the future, we plan to extend these results by experimenting on larger datasets, even if this kind of validation is quite challenging, as it demands quite a lot of efforts and manipulations to obtain validation data.