(1) Introduction
X-ray microcomputed tomography (X-ray µCT) has become a widely used technique in micropaleontology in recent years. This non-destructive approach enables the investigation of microfossil morphological features that are inaccessible using conventional microscopy. High resolution in the sub-micrometer range and simultaneous imaging of overall shell morphology and ultrastructure allows the investigation of taxonomic features in unprecedented detail.
The software presented here was developed specifically to process µCT scans of foraminifera, which are probably the most important group of microfossils. Foraminifera are microscopic, single-celled marine organisms inhabiting the upper layers of the open ocean and the ocean floor. They secrete intricately structured shells of calcium carbonate that accumulate over time to become one of the most interesting aspects of the geological sediment record. Owing to their abundance and sensitivity to variations in ocean temperature, chemistry, and circulation, foraminifera serve as essential proxies in paleoceanographic and paleoclimatic reconstructions (e.g., [1] and references therein).
Although numerous high-quality software solutions for 3D image segmentation exist, they generally lack the functionality required for typical foraminiferal µCT datasets, in which both the shell material and the shell lumen are of interest. The presented software integrates the essential tools needed to achieve complete segmentation of both the foraminiferal shell and the non-imaged chamber lumina across all growth stages within a single graphical user interface (GUI).
Rather than replicating existing solutions for semi-automatic shell segmentation, the software uses the segmented shell as input. It provides a straightforward method for generating chamber lumen segmentations, while also allowing the import of lumen segmentations created manually or with external software for further processing or refinement. Established methods, such as ambient occlusion and simple volumetric operations, are used to objectively segment the individual chamber lumina of the foraminiferal shell. The segmented chambers can be classified and reproducibly separated from the exterior throughout all growth stages. Additionally, the input shell segmentation can be further subdivided into individual chamber shell walls.
Implementation and Architecture
Input requirements and options
The software requires a binary shell segmentation as minimal input. A preliminary chamber lumen segmentation can be performed upon project creation. Alternatively, a chamber lumen segmentation acquired with another software can be imported into GIPL (Guy’s Image Processing Lab) or binary format.
GUI
The editing of generated or imported chamber lumen segmentation label fields is the main purpose of the software, and consequently, it was realized as a GUI. It was built in MATLAB (R2017b 9.3.0.713579) using the GUIDE GUI design environment. The architecture follows the classical Model-View-Controller pattern.
Model state is stored as an array of unsigned 16-bit integers (uint16) matching the input data, augmented by a trailing dimension of size four. Theoretically, up to 65k different labels could be stored across four layers. The underlying shell segmentation data is stored as a binary array and remains immutable to the software. Default processing and display parameters of the GUI can be loaded and saved into a user-specific configuration file. Basic input/output functionality, such as loading and saving of projects as well as macros and links to documentation and tutorials, is available via the menu bar. Callbacks validate user input and delegate computation to external utility functions. Modifications of the model state is updated to the view state after the completion of required calculations.
The GUI (Figure 1) layout is structured into eight panels: the label visualization or project view, the project information, view and select, camera controls, 3D environment visualization, basic shell segmentation, lumen operations, and label data. A toolbar menu provides the options for file import, export, and project creation. All GUI elements provide a short explanatory tooltip when the pointer is hovered over them. A user manual, providing concise explanations of all GUI components and available label operations, is accessible as a PDF via the Help option in the toolbar menu.

Figure 1
The GUI layout of MFSE.
On the left side of the GUI, the segmentation label field is rendered in 3D and can be rotated and zoomed using the pointer or camera control tools. Labels may be selected individually or as groups using the pointer. The visualization style for each label can be chosen in the label data table (normal, smoothed, or voxel-based). It should be noted that the vectorized visualizations (normal and smoothed) represent interpretative surface renderings rather than exact representations of the underlying binary voxel data.
The project information panel displays essential details about the segmentation project, including data source file names, segmentation data dimensions and resolution, as well as a basic label overview and user comments. The view and select panel provides tools for controlling label visibility and selection through a multi-part label filter, along with buttons for commonly used selections. The 3D environment panel contains options for displaying labels within a 3D reference frame, including labelled axes and a grid. The basic shell segmentation panel allows the underlying imported shell segmentation to be visualized alongside the label field.
The lumen label operations panel consists of three alternatively active panels: general, lumen, and shell label operations. The general label panel includes operations applicable to all label types, while the lumen and shell panels provide functions restricted to their respective label classes. In general, labels can be split, merged, deleted, reduced to a single connected component (singularized), or morphologically simplified. Special label operations specific to lumen and shell classes are described in the following section.
The label data table contains comprehensive information for all labels within the current segmentation project. Users can modify label attributes such as name, morphounit, class, group, type, visibility, and visualization mode. The table also displays computed label properties, including the number of connected components (patches), volume, principal axis length, convex volume, and others. The displayed properties can be customized through the preferences menu in the toolbar.
Notable label manipulations
Chamber lumen delimitation
Distinguishing between the interior and exterior of a chamber of a foraminifera shell with a typically asymmetrical shape and aperture, i.e., determining the chamber biovolume, the volume that is or could be occupied by the living cytoplasm, is a non-trivial problem with no single objectively correct solution. Here, we propose a mathematically reproducible approach based on the ambient occlusion algorithm. Ambient occlusion values (an in-depth explanation of the algorithm can be found in Titschack et al. [2]) are computed for all voxels of the selected label, using the basic shell segmentation as the occluding boundary. The threshold separating the interior from the exterior of a chamber is defined as the ambient occlusion value that maximizes the volume-to-surface-area ratio of the label within a specified range of threshold values. The resulting volume typically represents the chamber interior, bounded by a concave surface whose geometry is governed by the size and shape of the chamber aperture. In addition to in situ delimitation of chamber lumina, the software provides functionality to delineate chamber lumina in a hypothetical in vivo state of the specimen. Once all chamber lumen labels have been correctly enumerated and classified, and the corresponding primary shell labels have been generated (see below), the Delimit in vivo operation allows the user to delimit any chamber lumen as if that lumen were the ultimate, terminal chamber.
Individual chamber wall tracing
After completion of the editing and classification of the chamber lumina, the original shell segmentation can be subdivided into individual chamber shell walls. The underlying algorithm is inspired by the ambient occlusion approach and operates on label data in both voxel-based and vectorized representations. Similar to ambient occlusion, rays are projected from all face centers and vertices of a vectorized chamber lumen patch, following the direction of the corresponding face or vertex normal. Each ray is traced through the basic shell segmentation, and the labels of the intersected shell voxels are recorded. Applying this procedure to all face and vertex normals of a chamber lumen label yields a collection of voxel sequences that collectively represent the shell wall enclosing the corresponding chamber lumen. Factors that may interfere with accurate segmentation of a chamber wall, such as chamber walls merging at sutures, variations in shell thickness, shell porosity, and secondary calcification, can be partially mitigated by adjusting cutoff parameters for the extracted sequence lengths and by allowing interruptions within voxel sequences. In addition, this method enables chamber-specific quantification of secondary calcification.
Typical workflow
The typical complete workflow consists of seven steps (see also Figure 2).

Figure 2
The typical MFSE workflow for the complete segmentation of a µCT scan of a foraminifera shell.
Project generation (import or generation of chamber lumen labels)
Editing existing chamber lumen labels
Classification of the chamber lumen labels
Tracing of the primary chamber walls
Editing of the primary chamber walls
Delimitation of the in-vivo chamber lumina
Finalization of the individual chamber walls
Several short video tutorials about the GUI, general project creation, and the overall recommended segmentation procedure are available in a YouTube channel (@MFSE-tutorials-123). In addition, the CT scan data and shell segmentation of a planktic foraminifera of the species Globigerinita glutinata are provided along the installation files.
Output
The generated segmentations can be exported in raw binary or GIPL format.
Quality control
Functional software tests have been performed on Windows 10 and Windows 11 with MATLAB releases R2017b and R2019a.
The software has been tested for the reproducibility and feasibility of results on five different datasets with various types of foraminiferal morphology. In terms of feasibility, the shape (also continuity and completeness) and selected morphological parameters (principal axis lengths, wall thickness) of generated chamber and shell labels were visually and numerically inspected. As several of the employed algorithms are novel, existing ground truthing data is generally unavailable. Numerical comparisons of segmented labels with manually generated labels have not been performed.
(2) Availability
Operating system
The MATLAB source code is platform-independent and executable in MATLAB IDEs for Windows, macOS, and Linux. An installer for Windows, independent from the MATLAB IDE, is archived on GitHub and Zenodo. The installer executable performs a Full Installation/Desktop Deployment of MFSE and automatically downloads and installs the required MATLAB Runtime (Version R2107b), if not already installed, from the MathWorks servers (internet access required for installation only).
Programming language
MATLAB R2017b (9.3.0.713579); 64-bit; Sep 14, 2017.
Additional system requirements
The complete installation requires 4.2 GB of HDD space (3.8 GB used by the MATLAB Runtime). A minimum of 2 GB RAM is required; there are no specific graphics card requirements, but a card with OpenGL support and a minimum of 1 GB of GPU memory is recommended; a minimum screen resolution 1920 × 1080 is required. We generally recommend employing powerful hardware suitable for complex graphics applications for the visualization and manipulation of large datasets (>5003 voxels). The software makes use of parallelization for the more complex algorithms; nonetheless, the time required for some processing steps in large datasets can be significantly larger than 10 minutes.
Dependencies
MATLAB R2107b to R2020b for the execution of the source code in the MATLAB IDE. MATLAB Runtime R2107b for the standalone installed version. All releases of the MATLAB Runtime are archived and available from the MathWorks web pages permanently. All used third-party functions are referenced and included in the GitHub release and the install executable of MFSE.
List of contributors
MS: Programming of the software and GUI. Writing of the article.
DS: Feedback on GUI design and functionality, co-writing of the manual, manuscript editing, software testing.
Software location
Archive (e.g., institutional repository, general repository) (required – please see instructions on journal website for depositing archive copy of software in a suitable repository)
Name: Zenodo
Persistent identifier: DOI: 10.5281/zenodo.17800194
Licence: GNU GENERAL PUBLIC LICENSE Version 3
Publisher: Michael Siccha
Version published: 1.0
Date published: 22/12/2025
Code repository
Name: GitHub
Identifier: msiccha/MFSE.git
Licence: GNU GENERAL PUBLIC LICENSE Version 3
Date published: 22/12/2025
Language
English
(3) Reuse potential
The software toolbox was developed to solve a complex but narrowly defined problem. Apart from its potential use for micropaleontologists and biologists working on foraminifera, it might prove useful for researches from other fields working on the segmentation of polythalamous (biological) interconnected structures such as bryozoans or corals. The software can be easily expanded to include further macros to allow for faster processing. The methodology for lumen space limitation and shell determination might be applied to various segmentation problems where asymmetric closed or unclosed cavities are surrounded by sequentially or asymmetrically deposited material. General support, specific feature requests, or bug reports can be submitted by email to the corresponding author.
Acknowledgements
Thanks to my colleagues Johan Faust and Raphael Morard for help with testing the software. The MFSE project contains data, source code, or embedded functions from various sources [3, 4, 5, 6, 7, 8, 9, 10]. I would like to thank these authors for their work.
