Skip to content

Add WMA-based hemisphere export mode#2

Open
guikunchen wants to merge 1 commit into
SlicerDMRI:mainfrom
guikunchen:main
Open

Add WMA-based hemisphere export mode#2
guikunchen wants to merge 1 commit into
SlicerDMRI:mainfrom
guikunchen:main

Conversation

@guikunchen

Copy link
Copy Markdown

Summary

This PR adds a Hemisphere export mode to the TractCloud CLI.

When --hemisphere-atlas-dir is provided, TractCloud now:

  • runs normal fine-cluster inference
  • registers the input tractography to the ORG atlas using WMA
  • assigns streamlines to left, right, or commissural groups
  • writes hemisphere-split .vtp tract files
  • writes an annotated whole-tractography file with FineLabel, CoarseID, and HemisphereLocation cell arrays
  • writes a hemisphere_summary.json

Default CLI behavior is unchanged when --hemisphere-atlas-dir is omitted. Hemisphere mode does not support --mrb and does not export Other tract bundles.

Changes

  • Added src/tractcloud/hemisphere.py
  • Added --hemisphere-atlas-dir CLI option
  • Refactored pipeline inference so hemisphere mode can reuse raw fine-cluster predictions
  • Added WMA as a Git dependency:
    whitematteranalysis @ git+https://github.com/SlicerDMRI/whitematteranalysis.git
  • Added Hemisphere mode documentation in src/tractcloud/README_hemisphere.md

@ljod
ljod requested a review from pieper July 8, 2026 20:30
@ljod

ljod commented Jul 8, 2026

Copy link
Copy Markdown
Member

I looked with Guikun and results look correct after running this, and it solves a big user issue. Hoping Steve @pieper can take a quick look at this too

@pieper pieper left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants