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.

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

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:

    python slicer/package_slicer_modules.py
    python 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. Add your preferred citation format here.

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.1.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.1.0-py3-none-any.whl (28.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neuromodex_vnet_dbs-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 2a493475f757e556eae45693808da99bacef8942c0ce73c848c1665f8c106a84
MD5 19b99471cd52bc539014c0b61293dd33
BLAKE2b-256 4b3348dcb50a95737f98a46a4e78b266697c962bd89d9569a2816ab545341d0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neuromodex_vnet_dbs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ea30f54e47ccc034442da2ab96cdd46eef17e2ae0d30cba05271591ba7ccdf9
MD5 63b7a342cb7850c9c193bc3f258d47e3
BLAKE2b-256 b2be44a77b7c570d625a5f9e6055cdd4fbe44af6b82eb677c1298cb0ea88492d

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