R-Vessel-X / SlicerRVXLiverSegmentation

3D Slicer plugin for Liver Anatomy Annotation by R-Vessel-X
BSD 2-Clause "Simplified" License
31 stars 7 forks source link
3d-slicer-extension

RVesselX Slicer Liver Anatomy Annotation Plugin

DOI

Table of contents

Introduction

The RVesselX slicer plugin is a plugin for Slicer3D which aims at easing the segmentation of liver, liver vessels and liver tumor from DICOM data for annotation purposes. The exported segmentations will then be used in research.

The plugin provides a systematic annotation workflow and tools to allow for fast segmentation. The plugin is separated in the following tabs :

At the end of the workflow, the annotated data can be saved to a given output directory.

For more information on the R-Vessel-X project, please visit :
https://anr.fr/Projet-ANR-18-CE45-0018

Using the Plugin

Video tutorials

The following videos outline the different steps to install and use the plugin. For more detailed explanations, please refer to each section.

Installing the plugin

The plugin can be installed in Slicer3D using the extension manager. It can be found using the search bar by typing "RVesselX".

When first installing the plugin the following extensions will be installed as well :

After installing the extension, Slicer will have to be restarted for the module to be accessible. After Slicer has been restarted, the module can be found using the module finder under the name "RVX Liver Segmentation" . It can also be found by navigating the module list and clicking on Segmentation>RVX Liver Segmentation module.

After the module is first installed, additional Python libraries will have to be installed. The libraries will be installed automatically by clicking on the Download Dependencies and restart button. The library will be downloaded from Python pip and installed automatically.

Plugin Overview

The plugin is built upon the following tabs : Data, Liver, Portal Veins, Portal Veins Edit, IVC Veins, IVC Veins Edit, Tumors. Navigation between tabs is done either using the arrow buttons at the top of the plugin or by directly clicking on the tabs.

Each tab is oriented towards one part of the segmentation workflow but can work independently of the other tabs.

Sample Data

To test the plugin, the 3D_IRCAD_B_5_Liver data can be loaded from the Sample Data module. To properly load the data in the plugin, it is advised to first open the plugin and afterwards to navigate to the Sample module and to load the data.

This data is extracted from the 3D-IRCADb (3D Image Reconstruction for Comparison of Algorithm Database) database. The content of 3D-IRCADb is subject to a CC Attribution-Non commercial-No Derivative Works 3.0 licence.

For more information on the IRCAD Database please visit : https://www.ircad.fr/research/3dircadb/

Data import and visualization

The Data Tab is used to open the patient data. Loading can be done using the Load DICOM and the Load Data buttons. The input volume needs to be selected using the Volume combo box.

The Data Tab aggregates the functionalities of the load Data and load DICOM buttons as well as the Volume and Volume Rendering modules for volume display customization.

To start working on the segmentation :

Liver segmentation

The Liver Tab is used to segment the liver volume. Two segments are created by default, the Liver In and Liver Out segments.

The Segment CT/MRI Liver segmentation effect is also available for fast segmentation of the liver for CT and MRI data. This segmentation effect is built upon MONAI and PyTorch to provide ML accelerated segmentation for CT and MRI data.

Manual Liver segmentation

To manually segmenting the liver can be done using the following process:

AI Liver segmentation

AI segmentation of the liver can be done using the following process:

Portal veins segmentation

The portal veins segmentation is split into two tabs.

The Portal Veins tab is used to initialize the segmentation of the vessels using a vessel intersection tree. First the vessel tree needs to be constructed by selecting the vessels branching nodes in the views. To place the nodes, click in the tree on the intersection to be placed. Then click in the 2D or 3D view to place the markup node.

The tree is constructed in a depth first manner. First the root of the tree should be selected, then each intersection should be selected until the end of the vessel is reached.

Hovering over an item of the tree will display an image indicating the position of the node in the tree. Clicking on the Show Current Node Placement Help will display the image of the position of the current node being placed.

Edition of the nodes position is done using the Unlock Node Position button. This mode is enabled while the button is checked. It can be disabled by pressing the Escape keyboard key.

The nodes can be deleted in the left panel by either clicking the delete icon or by pressing the delete keyboard key.

Intermediary nodes can be placed to improve the vessel extraction by clicking on the Insert before button in the tree.

Once every node has been placed, the vessels can be extracted from the constructed tree using the Extract Vessels from node tree button. The parameters of the vesselness can be edited to refine the extraction of the vessels.

After the portal vessels have been extracted, the segmentation can be refined using the Portal Veins Edit tab. This tab uses the segmentation editor and allows for refining the overall portal vein segmentation using the segment editor tools.

After the portal vein volume has been edited, click on the Proceed to vessel splitting button. This button will extract the center line for each portion of the portal vessels and will create one empty segment per vessel branch. The scissors tool will be selected automatically and will allow for splitting the overall portal vein volume into its sub-branches.

Constructing the portal tree

Extracting and segmenting the portal tree

The vessel tree segmentation is based on the following operations :

To proceed with the segmentation :

Editing the portal tree

Splitting the portal tree

IVC veins segmentation

The IVC vein segmentation principle is identical as the portal vein segmentation but for the IVC veins. For more information on each step, please refer to Portal veins segmentation

Constructing the IVC tree

Extracting and segmenting the IVC tree

Editing the IVC tree

Tumor segmentation

The Tumor tab allows for annotating the portions of the liver which present any tumors. It uses the segment editor configured with two segments.

Exporting the results

To export the annotation results, navigate to the last tab (the Tumor tab) and click on the Export all segmented volumes button. A dialog will open querying the location where the results need to be saved.

The following results will be saved :

Changelog

1.1.0 (2023/07/12)

Developers

Manually installing the plugin

The plugin depends on the VMTK and the extra segmentation editor effects extensions. Extensions can be installed in Slicer3D using the extension manager.

Once VMTK was installed, the plugin can be installed by going to : Edit > Application Settings > Modules > Additional module paths

The RVXLiverSegmentation and RVXLiverSegmentationEffect directories need to be added to the path list.

When first loading the plugin, a button will be displayed to download the required Python packages. After the download, the application will be restarted and the plugin will be ready for usage and development.

Testing

To verify the plugin install, the unit tests of the plugin can be run by enabling Slicer developer mode. To enable the developer mode go to : Edit > Application Settings > Developer

Then tick the Enable developer mode check box. The application may need to be restarted for this modification to be taken into account.

To run the unit tests, open the RVesselX plugin, expand the Reload & Test menu and click on the Reload and Test button.

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

This project welcomes contributions. If you want more information about how you can contribute, please refer to the CONTRIBUTING.md file.