-
Notifications
You must be signed in to change notification settings - Fork 1
Stereotactic Target Prediction Feature #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
-expose setereotaxy.py as a recognizable shell command (similar to apply.py) -fix target labeling and encoding -tested end-to-end workflow
- tested workflow end-to-end and ran successfully on linux machine using poetry for configuration
6974844 to
91ca79f
Compare
Hey @ataha24! I have rebased |
Cool, thanks for doing that @Dhananjhay! This branch is ok as is, just need to change the way we execute the rule as it is structured in the same way that apply used to be called. |
…ay to how we run the gen_fcsv rule.
|
Merging this, excellent work as always @ataha24!! |
🚀 PR: Stereotactic Target Prediction
🧠 Overview
This PR implements stereotactic target prediction, based on the idea that brain coordinates are spatially correlated and can be used to predict each other (10.1016/j.neurom.2022.10.015). This feature leverages a pre-trained machine learning model to predict surgical targets from anatomical fiducials (AFIDs), enhancing preoperative planning workflows.
🔍 How It Works
The workflow takes the output of the gen_fcsv rule (CNN-generated AFIDs) and feeds it into the new stereotaxy rule (stereotaxy.smk). The pre-trained model maps these AFIDs to a stereotactic target of interest. Currently, the codebase supports the prediction of the subthalamic nucleus (STN). Future updates will include support for additional targets (e.g., cZI, GPi).
📂 Outputs of stereotaxy.smk
.fcsv file: Contains the predicted target coordinates
ACPC transformation matrix (.txt): Compatible with 3D Slicer for easy visualization of the predicted target in native brain space
🔧 Changes to the Codebase
utils.pyAdded new helper functions for coordinate transformation, ACPC alignment, and AFID manipulation (with annotations).
stereotaxy.smkNew rule to activate the correct model and predict surgical targets from AFIDs.
📁 Resource Additions
Pre-trained models, .fcsv template files, and transformation utilities for modularity and ease of extension.
📚 Documentation Updates
Instructions on how to use the stereotaxy feature, including guidelines for adding new stereotactic targets.
target_fcsvtemplate when target is requested (Currently only support STN)