Skip to content

radiuma-com/SlicerPySERA

Repository files navigation

SlicerPySERA — PySERA Radiomics Extension for 3D Slicer

3D Slicer Extension Python Version License Status

SlicerPySERA integrates the PySERA radiomics engine into 3D Slicer as an interactive extension.
It enables reproducible, IBSI-compliant handcrafted radiomics as well as deep feature extraction directly within the Slicer environment.


Table of Contents

  1. Overview
  2. Repository Structure
  3. Key Features
  4. Screenshots
  5. Installation
  6. Usage in 3D Slicer
  7. Data & Batch Expectations
  8. Parameters
  9. Output
  10. Troubleshooting
  11. Integration Notes
  12. Version History
  13. Contact
  14. Maintenance
  15. Authors
  16. Citation
  17. License
  18. Support
  19. Acknowledgment

Overview

SlicerPySERA provides a graphical interface for configuring and running radiomics pipelines on medical images and segmentations within 3D Slicer. It exposes all relevant IBSI (Image Biomarker Standardisation Initiative)-aligned preprocessing and feature extraction settings directly through the GUI.

It leverages the PySERA library for computation, ensuring standardized, reproducible, and validated radiomics results.

Key capabilities:

  • IBSI-compliant handcrafted radiomics and deep features
  • Multi-format compatibility (NIfTI, DICOM, NRRD, RTSTRUCT, etc.)
  • Batch and parallel processing support
  • Comprehensive logs and parameter export for reproducibility

Repository Structure

  • PySera_Ext/ – Main 3D Slicer ScriptedLoadableModule (GUI). Includes vendored parameter files under pysera_lib/.
  • PySeraCLI/ – Optional CLI wrapper for headless runs. Includes vendored parameter files under pysera_cli_lib/.
  • Data/ – Example datasets for testing and development purposes.
  • Resources/ – All non-code assets, including GUI icons, screenshots, configuration files, and templates for reports.

Note: The core pysera library is installed into Slicer’s Python using slicer.util.pip_install("pysera") at runtime.


Key Features

  • Fully integrated with 3D Slicer – no external scripts required
  • IBSI-compliant handcrafted features (morphological, texture, statistical, etc.)
  • Deep-learning feature extraction with pretrained models (ResNet50, VGG16, DenseNet121)
  • Advanced configurability – bin size, discretization, resampling, intensity rounding
  • High reproducibility – parameter snapshot and structured report export

Screenshots

The following screenshots illustrate the main workflows and tabs of the SlicerPySERA module.
All images are located in Resources/Screenshots/.

Title & Feature Categories

Title and feature categories

Input / Output Settings

Input and Output settings

Handcrafted Feature Extraction Mode

Handcrafted mode

Deep Feature Extraction Mode

Deep feature mode

Setting Parameters

Setting parameters

Feature Subset Selection

Feature subset selection

Run & Show Results

Execution and results

Installation

Option 1 — Scripted Module (recommended)

  1. Clone or download this repository.
  2. In 3D Slicer, navigate to:
    Edit → Application Settings → Modules → Additional Module Paths
    Add the path to the PySera/ directory, then restart Slicer.
  3. Ensure pysera is available to Slicer’s Python:
    • Simplest: copy pysera/ into PySera/lib/pysera/
    • Alternatively: install pysera into Slicer’s Python interpreter.
  4. After restarting, PySERA appears under the Radiomics module category.

Note: The PySERA library can also be used independently in Python.


Usage in 3D Slicer

  1. Load an image and segmentation (mask) into Slicer.
  2. Open Modules → Radiomics → PySERA.
  3. Select image and mask inputs, and specify output directories.
  4. Choose Handcrafted or Deep feature extraction mode.
  5. Adjust IBSI parameters (for handcrafted mode).
  6. Select categories/dimensions for feature subsets.
  7. Click Apply to start feature extraction.

Data & Batch Expectations

  • Compatible with NIfTI, NRRD, DICOM, and RTSTRUCT inputs.
  • Ensure image/mask folder structures are mirrored and contain no extra nesting.
  • RTSTRUCT processing uses a temporary cache folder (temporary_files_path).

Parameters (selected)

Common (both modes)

Parameter Description
`num_workers`Number of CPU cores or “auto” for automatic selection
`enable_parallelism`Enables multiprocessing if supported
`apply_preprocessing`Apply IBSI-aligned ROI preprocessing
`min_roi_volume`Minimum ROI volume threshold (mm³)
`roi_selection_mode`“per_Img” or “per_region” for ROI grouping
`roi_num`Number of ROIs to process
`aggregation_lesion`Enable multi-lesion feature aggregation
`report`Logging level: “all”, “info”, “warning”, “error”, “none”
`temporary_files_path`Directory for temporary cache files

Handcrafted only (IBSI-related)

Category Parameter Description
Data Type`radiomics_DataType`Imaging modality (“CT”, “MR”, “PET”, “OTHER”)
Discretization`radiomics_DiscType`, `bin_size`Quantization type (“FBS”/“FBN”) and bin width
Resampling`radiomics_isScale`, `radiomics_VoxInterp`, `radiomics_ROIInterp`, `radiomics_isotVoxSize`, `radiomics_isotVoxSize2D`, `radiomics_isIsot2D`Voxel scaling, interpolation, isotropic resampling
Intensity Handling`radiomics_isGLround`, `radiomics_isReSegRng`, `radiomics_ReSegIntrvl01`, `radiomics_ReSegIntrvl02`, `radiomics_isOutliers`, `radiomics_isQuntzStat`, `radiomics_ROI_PV`Rounding, re-segmentation range, and partial-volume control
IVH Parameters`radiomics_IVH_Type`, `radiomics_IVH_DiscCont`, `radiomics_IVH_binSize`Controls Intensity-Volume Histogram discretization
Feature Precision`feature_value_mode`“REAL_VALUE” or “APPROXIMATE_VALUE” for NaN handling

Deep Feature Mode

Parameter Description
`extraction_mode`Set to "deep_feature" to enable deep CNN feature extraction
`deep_learning_model`Deep model backbone (`resnet50`, `vgg16`, `densenet121`)
NoteIBSI parameters are ignored when using deep feature extraction mode.

Output

  • Excel Report with:
    • Radiomics_Features: All extracted features
    • Parameters: Run configuration
    • Report: Warnings or extraction issues
  • In-Slicer summary log after each run.

Troubleshooting

Issue Resolution
No visible effect of report level Ensure report level is set before pressing “Apply”.
'str' object is not callable error Occurs due to Qt bindings; fixed internally via safe access.
Missing output Verify mirrored image/mask structure and writable destination folder.
DICOM RTSTRUCT memory errors Confirm temporary_files_path is on a writable drive.

Integration Notes

  • Implemented as a ScriptedLoadableModule using Qt/CTK.
  • Parameters are grouped for Handcrafted and Deep extraction modes.
  • Synchronization maintained between selected categories and dimensions.

Version History

v1
└─ v1.0
   └─ v1.0.0 — Initial stable release

Contact

For general inquiries or academic collaboration:

Dr. Mohammad R. Salmanpour (Team Lead)
📧 [email protected] · [email protected] · [email protected]


Maintenance

For technical support and maintenance inquiries:

Dr. Mohammad R. Salmanpour (Team Lead)
[email protected] · [email protected] · [email protected]

Sirwan Barichin


Authors

  • Dr. Mohammad R. Salmanpour (Team Lead, Fund Provider, Evaluator, Medical Imaging Expert, Backend, Refactoring, Debugging, Library Management, IBSI Standardization, Slicer GUI) – [email protected], [email protected], [email protected]
  • Sirwan Barichin (IBSI Standardization, Backend, Refactoring, Debugging, Library Management, Activation of PySERA Library, Slicer GUI)
  • Dr. Mehrdad Oveisi (Evaluator, Software Engineer, Advisor)
  • Dr. Arman Rahmim (Fund Provider, Medical Imaging Expert, Evaluator, Advisor)

Citation

If you use this extension or PySERA in your research, please cite the following paper:

@misc{salmanpour2025pyseraopensourcestandardizedpython,
      title={PySERA: Open-Source Standardized Python Library for Automated, Scalable, and Reproducible Handcrafted and Deep Radiomics}, 
      author={Mohammad R. Salmanpour and Amir Hossein Pouria and Sirwan Barichin and Yasaman Salehi and Sonya Falahati and Isaac Shiri and Mehrdad Oveisi and Arman Rahmim},
      year={2025},
      eprint={2511.15963},
      archivePrefix={arXiv},
      primaryClass={physics.med-ph},
      url={https://arxiv.org/abs/2511.15963}, 
}

License

Released under the MIT License.
See LICENSE for details.


Support


Acknowledgment

Supported by:

Funding provided by the Natural Sciences and Engineering Research Council of Canada (NSERC)
Idea to Innovation (I2I) Grant GR034192.


This repository provides the SlicerPySERA extension for 3D Slicer.
The PySERA core library is maintained separately for standalone Python usage.