SE FB registration#113
Conversation
…er handling for epicardium and endocardium, updating plotting functions, and refining denoising parameters.
…dium and endocardium, and update image registration with mask support in the registration loop.
…ecord_image_registration
There was a problem hiding this comment.
Pull request overview
This PR explores improved registration strategies for SE free-breathing acquisitions by adding an ANTsPy-based non-rigid option and introducing a new Elastix non-rigid “FB” recipe, alongside updates to use newly-derived “true border” contours across visualisation and QC tooling.
Changes:
- Added new registration options:
ants_non_rigid(ANTsPy) andelastix_non_rigid_fb(new Elastix B-spline recipe). - Updated multiple plotting/QC paths to use
epicardium_true_border/endocardium_true_borderinstead of the spline-interpolated contours. - Tuned denoising behaviour (reduced NLM strength; skip denoising for SE) and made minor UI/visualisation tweaks.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/indi/scripts/main.py | Removes commented ITK threading code from the entrypoint. |
| src/indi/extensions/select_outliers.py | Plots segmentation overlays using “true border” contours in the manual outlier UI. |
| src/indi/extensions/read_data/read_and_pre_process_data.py | Uses “true border” contours for montage overlays; adjusts DICOM comment handling. |
| src/indi/extensions/manual_lv_segmentation.py | Adds “true border” overlay outputs and minor UI label tweaks for manual LV segmentation. |
| src/indi/extensions/image_registration.py | Adds ANTsPy registration option; adds new Elastix FB recipe; adjusts denoising strategy. |
| src/indi/extensions/image_registration_recipes/Elastix_bspline_fb.txt | Introduces a new Elastix B-spline parameter file for FB use. |
| src/indi/extensions/heart_segmentation.py | Ensures/derives “true border” contours when loading or generating segmentations. |
| src/indi/extensions/extensions.py | Updates results plotting to use “true border” contours and insertion points. |
| src/indi/extensions/crop_fov.py | Crops/updates “true border” contour coordinates; enhances registration debug visualisations. |
| settings_template.yaml | Documents new registration modes in the template settings. |
| pyproject.toml | Adds antspyx dependency for ANTsPy registration. |
| .pre-commit-config.yaml | Updates the pinned isort hook revision. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if "image_comments" in info.keys(): | ||
| logger.debug("Dicom header comment found: " + info["image_comments"]) |
Alberto Di Biase (tito21)
left a comment
There was a problem hiding this comment.
Some of the comments from copilot look a bit concerning.
ANTsPy seems slow to install, maybe we could move it as an optional dependency (it took ~12min to reinstall indi).
| return denoised_img | ||
|
|
||
|
|
||
| def registration_loop( |
There was a problem hiding this comment.
This can be refactored. I think it could be one general function for the elastix methods and a different function for each other methods
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…geLondon/INDI into se_fb_registration
…es and alpha values, and adding a colorbar for better clarity
Trying to improve the registration for SE free-breathing acquisitions...
Added a new method, based on ANTsPy:
https://github.com/ANTsX/ANTsPy
But not sure it is better. Seems to use more and unecessary non-rigid deformations.
Also added a new elastix recipe with more non-rigid deformations.