Skip to content

SE FB registration#113

Merged
Pedro Ferreira (Pedro-Filipe) merged 14 commits into
mainfrom
se_fb_registration
Jun 17, 2026
Merged

SE FB registration#113
Pedro Ferreira (Pedro-Filipe) merged 14 commits into
mainfrom
se_fb_registration

Conversation

@Pedro-Filipe

Copy link
Copy Markdown
Collaborator

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.

@Pedro-Filipe Pedro Ferreira (Pedro-Filipe) added the backend Related to the business logic of the tool label Jun 5, 2026

Copilot AI 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.

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) and elastix_non_rigid_fb (new Elastix B-spline recipe).
  • Updated multiple plotting/QC paths to use epicardium_true_border / endocardium_true_border instead 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.

Comment thread src/indi/extensions/image_registration.py
Comment on lines +686 to 687
if "image_comments" in info.keys():
logger.debug("Dicom header comment found: " + info["image_comments"])
Comment thread src/indi/extensions/heart_segmentation.py

@tito21 Alberto Di Biase (tito21) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This can be refactored. I think it could be one general function for the elastix methods and a different function for each other methods

@Pedro-Filipe Pedro Ferreira (Pedro-Filipe) merged commit ebb7b31 into main Jun 17, 2026
1 check passed
@Pedro-Filipe Pedro Ferreira (Pedro-Filipe) deleted the se_fb_registration branch June 17, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Related to the business logic of the tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants