Skip to main content

NeuroModex VNet DBS: segmentation and conductivity mapping utilities

Project description

Neuromodex VNet DBS

Deep‑learning utilities for DBS workflows, including MRI brain tissue segmentation (VNet) and conductivity mapping. This repository provides a Python package and optional 3D Slicer modules to integrate the models into imaging workflows.

Note: This project is still under development.

Features

  • VNet‑based multi‑class brain tissue segmentation
  • Conductivity mapping utilities
  • Pre/post‑processing
  • PyTorch inference with automatic device selection (CPU/GPU)
  • 3D Slicer plugin scaffolding for GUI‑based use
  • The segmentation model was trained using labels generated with ELMA, a semi‑automatic DBS tissue classification/segmentation tool (commonly used to classify tissues such as grey matter, white matter, blood, and CSF for patient‑specific DBS FEM modeling workflows). [1] [2]

Installation

Requirements: Python 3.9+

pip install neuromodex-vnet-dbs

The wheel bundles the neuromodex_vnet_dbs/weights/ directory so the packaged models can load without any extra downloads.

Quick start Segmentation

Note that the input image must be skull stripped and preferably N4 bias corrected.

import SimpleITK as sitk
from neuromodex_vnet_dbs import SegmentationPipeline

# Load an input image (e.g., NIfTI)
img = sitk.ReadImage("/path/to/volume.nii.gz")
# or
img = "path/to/volume.nii.gz"

# Run the segmentation pipeline
pipe = SegmentationPipeline(img)  # pass either as string or sitk volume
result = pipe.segment_fast(img)  # ~7 seconds

# or this for clearer csf segmentation
result = pipe.segment_gmm_csf(img)  # ~1.5 minutes

# The returned object is the segmented image

Quick Start Conductivity Mapping

import SimpleITK as sitk
from neuromodex_vnet_dbs import ConductivityProcessingPipeline

mri_img = sitk.ReadImage("path/to/mri_image.nii.gz")
seg_img = sitk.ReadImage("path/to/seg_image.nii.gz")

pipe = ConductivityProcessingPipeline(seg_img, mri_img)
result = pipe.run()

3D Slicer integration

This repo includes helper scripts and example module folders under slicer/. These scripts can also be used as CLI tools.

  • To install one or more module folders into your local Slicer profile, run either:
from neuromodex_vnet_dbs.slicer import interactive_installation

interactive_installation()

or

python neuromodex_vnet_dbs/slicer/slicer_install_plugin.py

Follow the prompts to choose the plugin(s) and target Slicer installation. Restart Slicer afterwards.

The plugins can then be found in Segmentation/BrainSegmentation and Electrical Conductivity/ConductivityMapping.

License

This project is licensed under the terms of the MIT License. See the LICENSE file for details.

Citation

If you use this project in your research, please cite the appropriate papers for VNet and any downstream methods you apply.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuromodex_vnet_dbs-0.2.0.tar.gz (28.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neuromodex_vnet_dbs-0.2.0-py3-none-any.whl (28.3 MB view details)

Uploaded Python 3

File details

Details for the file neuromodex_vnet_dbs-0.2.0.tar.gz.

File metadata

  • Download URL: neuromodex_vnet_dbs-0.2.0.tar.gz
  • Upload date:
  • Size: 28.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for neuromodex_vnet_dbs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c37c98681017e1187d0b57a7a5fa0120c3ef591c1ceaa8bdedf0422c7f83aba0
MD5 9b4e29319ed5a12b8d398af68fc927d6
BLAKE2b-256 2095e47e0ed5e99a80bca9ff03ef0a7b65867dc5143c542d150bc4e9c857ae75

See more details on using hashes here.

File details

Details for the file neuromodex_vnet_dbs-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for neuromodex_vnet_dbs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee5548cfd63def9cd0dfef7c5f683e87886603a3b0e2a78d362aee1a454aaad5
MD5 8afc2142525f2d187742d8a2a92d57c1
BLAKE2b-256 cb816a5f285e797fbada98c3176f897969392984bb84d04c837f1e69efd6dc27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page