Slicer-Liver
Slicer-Liver: A 3D Slicer Extension for Liver Surgery Planning - Published in JOSS (2025)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in JOSS metadata -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
3D Slicer extension for liver analysis and therapy planning
Basic Info
Statistics
- Stars: 20
- Watchers: 2
- Forks: 9
- Open Issues: 29
- Releases: 1
Topics
Metadata Files
README.md
Table of content
Introduction
SlicerLiver is an extension for the medical research software 3D Slicer providing tools for analysis, quantification and therapy planning for hepatic interventions.
The extension provides a fast and accurate solution for:
- Definition of surgical resection in 3D using deformable surfaces, as well as the visualization of resection margins (risk areas).
- Computation and visualization of liver vascular territories (liver segments).
- Liver volumetry analysis.
Installing the extension
- Download and install 3D Slicer according to your operating system from here : https://download.slicer.org/.
- Open Slicer.
- Press Ctrl+4 to open the extension manager.
- Once the Extension Manager pops up, make sure to select the
Install Extensionstab. - On the upper-right search box write "slicerliver"
- Click
Installand give okay to install other extensions if asked.

- Restart Slicer.
- Once 3D Slicer restarts, click the search icon on the left of the module selector and write 'Liver'. Click
Switch to module.

Sample Data
To test the extension, the LiverVolume and LiverSementation data can be loaded from the Sample Data module, after installing Slicer-Liver. To properly load the data in the plugin, it is advised to first open the extension and afterwards to navigate to the Sample module and to load the data.

Slicer-Liver Extension Usage
The extension is separated in the following five sections:
- Distance Map Computation: projection of the safety margins in real-time onto the resection surface, which allows the user to modify the resection proposal until the safety requirement are met.
- Resections: computation of the first approximation (planar Bézier) of the resection surface which can be subsequently modified through 16 control points.
- Resectogram: visualization of the resection plan in a 2D view.
- Liver Segments: calculation and visualization of liver vascular territories (liver segments).
- Resection Volumetry: computation of the volume of the resection and the remaining liver.
Each section is oriented towards one part of the liver resection planning workflow but, if desired, can work independently of the other ones. At the end of the workflow, the distance map, resection plan, liver segments and volumetry tables can be saved to a given output directory.
Distance Map Computation
Follow these steps to compute the Distance Map:
- Reference Volume:
- Select the CT data from the dropdown menu.
- Segmentation:
- Choose the binary labelmap representing the segmentation of the liver, tumor, and vascular territories.
- Tumor:
- Select the tumor segmentation node.
- Liver:
- Select the liver segmentation node.
- Hepatic (if applicable):
- Select the hepatic segmentation node.
- Portal (if applicable):
- Select the portal segmentation node.
- Output Distance Map:
- Create a new
VectorVolumefor the output distance map.
- Create a new
- Downsampling Rate (optional):
- Adjust the downsampling rate if needed (default is 1.00).
- Compute Distance Map:
- Click the
Compute Distance Mapsbutton to start the computation.
- Click the
Ensure all required fields are filled; otherwise, the Compute Distance Maps button will remain inactive.
Resections
The liver resection can be planned through the following process:
- Create a new LiverResection for
Resection. - Choose the labelmap used in step 2 of the Distance Map Computation for
Liver Segmentation. - Select the
Liversegmentation from the dropdown. - Choose the contour initialization method:
Flat,Curved, orMarkupClosedCurve. - (Optional) Select the Distance Map from the first section using the
Distance Mapcollapsible button. - In the 3D View, when selecting the
FlatorCurvedmethods, use the guiding stick to adjust the contour around the liver. Alternatively, you can draw a closed curve using theMarkupClosedCurvemethod. (see contour initialization method) - Release the mouse to display the initial resection plane.
- Adjust the resection using the control points. Modify the
Resection grid,Resection margin, andUncertainty marginas needed. - Check the
Preview resectionbox to visualize the final plan.

There are multiple options to create visualizations for the resection (color, opacity, configurable grid, etc).
Contour Initialization Method
As introduced before, we have three contour initialization methods: Flat, Curved, or MarkupClosedCurve.
- The initialization process for both
FlatandCurvedmethods is similar in usage. In both cases, a guiding stick and a white cutting contour are displayed on the liver model. By moving the guiding stick, the contour’s position can be adjusted to align with the desired operation area.
The key difference lies in the type of resection surface generated:
- In the
Flatmethod, a flat resection surface is created. The displayed contour represents the intersection of this flat surface with the liver model. Users must manually adjust the flat surface to achieve a curved resection that meets their needs. In the
Curvedmethod, users can select a starting point (e.g., targeting different liver segments). The contour is inherently curved, generating a curved resection surface, which reduces the need for manual modifications compared to the Flat method.MarkupClosedCurveoffers a more flexible approach for defining the initial cutting position. Users can place a series of points that automatically connect to form a closed loop around the desired cutting area, outlining the initial cutting contour. Based on these points, the software then generates a curved initial resection surface.
![]() Flat |
![]() Curved |
![]() MarkupClosedCurve |
Resectogram
The Resectogram section in Slicer-Liver allows users to configure various options for visualizing the resectogram. Below are the available settings and their descriptions:
- Enable Resectogram:
- Check this box to enable the resectogram visualization.
- Mirror Resectogram Display:
- Check this box to mirror the display of the resectogram.
- Enable Flexible Boundary:
- Check this box to enable a flexible boundary for the resectogram.
- Resectogram Size Scale:
- Use the slider or the input box to adjust the size scale of the resectogram. The value can be set between 0 and 1.
- Hepatic Contour Size (in mm):
- Adjust the size of the hepatic contour by using the input box. The size can be configured in millimeters.
- Color Picker:
- Click on the color box to choose a different color for the hepatic contour.
- Portal resection contour size (in mm):
- Adjust the size of the portal resection contour by using the input box. The size can be configured in millimeters.
- Color Picker:
- Click on the color box to choose a different color for the portal resection contour.
- Vascular Segments Volume:
- Use the dropdown menu to select the vascular segments volume. The available options depend on the pre-loaded volumes in the software.
The resectogram can only be used after distance maps have been calculated and uploaded. The following GIF demonstrates the usage of the Resectogram section in Slicer-Liver:

Liver Segments
Our method for liver segment classification involves defining segments using centerlines created from user-specified points. These centerlines serve as the foundation for computing liver segments within the image space. The computation leverages shortest-distance mapping
- Vascular Territory Segmentation:
- Create or Select a vascular territory segmentation from the dropdown menu.
- Vascular Territory:
- Create a new territory ID.
- Segmentation:
- Select the segmentation node representing the hepatic/portal vessels, and a new Point List for marking
Vessel pointswill be created automatically.
- Select the segmentation node representing the hepatic/portal vessels, and a new Point List for marking
- Hide Unnecessary Segments:
- Use the
Show/Hidebutton to hide the liver and/or tumor segmentation nodes if they obstruct the view. This step is not required for creating centerlines on vessel branches but can improve visibility.
- Use the
- Vessel Points:
- Place landmark points on the hepatic/portal segmentation. These points will be added to
Vessel pointsand used to extract the centerlines of user-defined vessel branches.
- Place landmark points on the hepatic/portal segmentation. These points will be added to
- Add Vessel Centerline:
- After placing the points, click
Add Vessel Centerlineto generate the centerlines.
- After placing the points, click
- Create multiple Vascular Territories
- Repeat step 1-6 to create multiple Vascular Territories.
- Calculate Vascular Territory Segmentation:
- Once all points are placed and centerlines are added, click
Calculate Vascular Territory Segmentationto compute the liver segments.
- Once all points are placed and centerlines are added, click

Resection Volumetry
- Volumetry Output Table:
- Select or create an output table. You can rename the table or switch between different tables.
- Reference Volume:
- Select a liver volume node.
- Segmentation:
- Select a liver segmentation node (Labelmap node). This can be liver segmentation (vessel, tumor, liver), liver anatomy segments, or self-defined liver segments (adapted from the vessel segments module). You can select all segments in the dataset or only those of interest.
- Total Volume:
- Define the total volume by selecting the segments you wish to count (optional; by default, it is the sum of all segments in the data).
- ROI Marker List:
- Select or create a points list. You can place points onto 2D slices or 3D models to mark the area you want to measure. If no point list is provided, the volume of all segments will be calculated.
- Resection (Optional):
- Choose one or more resections for the same liver model and calculate the remnant/resected volume by placing marker points onto these areas.
- This can be combined with liver anatomy segments or self-defined liver segments to gain a deeper understanding of liver volumetry after different resection approaches (anatomical, atypical, etc.).
- It can also be used to compare different resection plans for the same tumor or to provide a combined view for one surgery with multiple resections.
- Export segments (Optional):
- Press the button "Generate segments based on selected resections and ROI markers" to export a new segmentation node including segmentations marked by ROI points and the unmarked area will be treated as one segmentation

Video Tutorial
Developers
Compilation
Slicer-Liver follows the 3D SLicer extension building process:
SLICER_BUILD_DIR=/path/to/Slicer-SuperBuild`
git clone https://github.com/ALive-research/Slicer-Liver.git
cmake -DSlicer_DIR:PATH=SLICER_BUILD_DIR/Slicer-build -S ../Slicer-Liver
make -j5
make package
Slicer-Liver depends on the VMTK, it can be installed in Slicer3D using the extension manager or built from source code.
Testing
To enable the developer mode go to :
- Edit > Application Settings > Developer
Then check the
Enable developer modecheck box. The application may need to be restarted for this modification to be taken into account.To run the unit tests, open the Slicer-Liver extension, expand the
Reload & Testmenu and click on theReload and Testbutton.To visualize the test results, open the Python console by going to: View > Python Interactor.
The number and the result of the tests will be displayed in the console. Should any of the test fail, please don't hesitate to open an issue or contact us through the Slicer forum.
Contributing
Slicer-Liver welcomes any and all contributions in the way of new tools/scripts, bug fixes or documentation. In the contributing page you will find information to help you get started.
Authors
- Rafael Palomar (Oslo University Hospital / NTNU, Norway)
- Ole Vegard Solberg (SINTEF, Norway)
- Geir Arne Tangen (SINTEF, Norway)
- Gabriella D'Albenzio (Oslo University Hospital)
- Ruoyan Meng (NTNU)
Contact: rafael.palomar@ous-research.no
License
This software is open source distributed under the 3-Clause BSD License
Acknowledgements
This software has partially been funded by The Research Council of Norway through the ALive project (grant nr. 311393).
Owner
- Name: ALive
- Login: ALive-research
- Kind: organization
- Repositories: 6
- Profile: https://github.com/ALive-research
JOSS Publication
Slicer-Liver: A 3D Slicer Extension for Liver Surgery Planning
Authors
Tags
Image-Guided Surgery Liver Surgery Planning Visualization Geometric ModelingGitHub Events
Total
- Create event: 4
- Release event: 1
- Issues event: 6
- Watch event: 4
- Delete event: 2
- Issue comment event: 10
- Push event: 25
- Pull request review comment event: 13
- Pull request review event: 23
- Pull request event: 26
Last Year
- Create event: 4
- Release event: 1
- Issues event: 6
- Watch event: 4
- Delete event: 2
- Issue comment event: 10
- Push event: 25
- Pull request review comment event: 13
- Pull request review event: 23
- Pull request event: 26
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 4
- Total pull requests: 12
- Average time to close issues: 9 months
- Average time to close pull requests: about 2 months
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 0.75
- Average comments per pull request: 0.67
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 11
- Average time to close issues: 23 days
- Average time to close pull requests: 2 days
- Issue authors: 3
- Pull request authors: 2
- Average comments per issue: 0.67
- Average comments per pull request: 0.64
- Merged pull requests: 7
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- RafaelPalomar (19)
- RuoyanMeng (3)
- olevs (2)
- zapaishchykova (1)
- gatangen (1)
- kruthi-manakari (1)
Pull Request Authors
- RuoyanMeng (11)
- RafaelPalomar (5)
- olevs (3)
- gatangen (1)
- dalbenzioG (1)
- jcfr (1)



