Ciclope: micro Computed Tomography to Finite Elements

The Python package ciclope processes micro Computed Tomography images to generate Finite Element models. Ciclope is aimed to provide reproducible and fully open-source pipelines for simulating the mechanical behaviour of trabecular bone using the Finite Element method.


Statement of need
Micro Finite Element (microFE) models derived from micro Computed Tomography (microCT) volumetric data can provide non-destructive assessments of mechanical properties of trabecular bone.The technique is used to investigate the effect of pathologies, treatment and remodelling on the mechanical response of bone at the tissue level, and is applied both to human and animal samples.Linear elastic microFE simulations are implemented to back-calculate the tissue elastic modulus (Bayraktar et al., 2004), understand deformation mechanisms (Zauel et al., 2005), or predict failure (Pistoia et al., 2002) of trabecular bone, as well as to estimate the stiffness of whole bones from small animals (Oliviero et al., 2020).
Different pipelines for the generation of microFE models of trabecular bone were proposed (Cox et al., 2022;Fernández et al., 2022;Megías et al., 2022;Stauber et al., 2004;Verhulp et al., 2008).Nevertheless, the validation and comparison of results across studies is hindered by the use of proprietary or non-open-source software, and by the general absence of reproducible FE pipelines.We present the Python package ciclope: a fully open-source pipeline from microCT data preprocessing to microFE model generation, solution and postprocessing.

Design
Ciclope is composed of a core library of modules for FE model generation (ciclope.core),and a library of utilities for image and FE model pre-and postprocessing (ciclope.utils)that can be imported and used within Python.Additionally, the ciclope.pyscript generated during package installation allows to launch microCT-to-FE pipelines directly from the commandline.A pipeline for the generation and solution of a FE model derived from 3D microCT data is shown in the central part of Figure 1.Image preprocessing: a microCT dataset is loaded as a NumPy ndarray within Python and segmented to isolate bone voxels and background using Otsu's method (Otsu, 1979) as provided by scikit-image (Walt et al., 2014).A connectivity check is performed to remove isolated clusters of voxels, that the segmentation might have disconnected from the main structure.According to the user's needs, additional image processing can be applied for smoothing, cropping, resampling and rotating the dataset using the SciPy (Virtanen et 2020) and scikit-image Python libraries.Furthermore, additional layers of material can be added at the top and bottom surfaces of the sample should the user need to replicate the effect of endcaps in the actual mechanical testing conditions.Meshing: ciclope allows to create two types of FE meshes.Image voxels can be directly converted to 8-node, hexahedral brick elements with the voxelFE.pymodule.Alternatively, meshes of 4-node tetrahedra can be generated calling CGAL (The CGAL Project, 2022) through the tetraFE.pymodule.FE model generation: the mesh is converted to an .INP input file for Abaqus/CalculiX FE solvers.Within model generation, it is possible to assign material properties, define the boundary conditions, analysis type and steps, and request specific simulation outputs using a separate analysis template .TMP file.Libraries of material_properties and input_templates are provided for this process.Additional CalculiX user examples and templates are available online (Kraska, 2022).For voxel-FE model generation, different material mapping strategies can be used: uniform tissue material properties (elastic modulus and poisson ratio) can be applied to all bone voxels.Alternatively, the local image intensity (voxel grey values) can be converted to heterogeneous material properties using a mapping law defined by the user.FE model solution and postprocessing: FE models can be solved using the external software Abaqus or CalculiX.Simulation ouptut files are read to compute, among other, total reaction forces on the model boundaries, or orthogonal cross-section plots of the model's displacement of stress fields.

The ciclope ecosystem
Ciclope relies on several other tools for 3D image and FE processing: • Voxel and tetrahedra mesh exports performed with meshio (Schlömer, 2022a).

Examples
Ciclope contains a library of Jupyter notebooks of example applications in the field of computational biomechanics (Figure 2).The main use case is a pipeline for the generation of microFE models from microCT scans of trabecular bone (Figure 2A).The microCT bone dataset used in the examples is part of the public collection of the Living Human Digital Library (LHDL, 2006), funded by the European Commission under grant ID: FP6-IST 026932).
Human tissues were collected according to the body donation program of Universitè Libre de Bruxelles (ULB), a partner of the LHDL project.
A linear elastic simulation of a mechanical compression test is used to calculate the apparent elastic modulus of trabecular bone.This procedure is demonstrated using hexahedra (voxel, Figure 2B), and tetrahedra (Figure 2C) finite elements.Two approaches for the local mapping of material inhomogeneities are illustrated using voxel and tetrahedra FE.Each example can be run within Jupyter or executed from the commandline with the ciclope.pyscript.
Ciclope can be applied to microCT scans other than trabecular bone and in fields other than biomechanics.A simulation of a mechanical test of a whole human teeth, and a non-linear analysis of metal foam plasticity are illustrated in the software examples.

Figure 1 :
Figure 1: Design of ciclope, and application to a pipeline for FE model generation from microCT data.