Skip to content

ENH: Produce 4D labelmap and CT images with lung and heart motion#94

Merged
aylward merged 1 commit into
Project-MONAI:mainfrom
aylward:ct_and_landmarks_4d
Jul 24, 2026
Merged

ENH: Produce 4D labelmap and CT images with lung and heart motion#94
aylward merged 1 commit into
Project-MONAI:mainfrom
aylward:ct_and_landmarks_4d

Conversation

@aylward

@aylward aylward commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added optional surface smoothing and mesh reduction while preserving boundary labels.
    • Added smoothing support for deformation fields.
    • Tutorial 10 now packages predicted surfaces into a 4D USD project.
    • Tutorial 11 now generates warped CT and anatomy labelmap volumes for each combined-motion frame.
  • Changes
    • Removed the previous transform-to-USD visualization API.
    • Updated tutorial outputs, checkpoint selection, and cleanup behavior.

Copilot AI review requested due to automatic review settings July 21, 2026 17:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Walkthrough

Changes

Motion workflow updates

Layer / File(s) Summary
Shared smoothing utilities and transform cleanup
src/physiotwin4d/contour_tools.py, src/physiotwin4d/transform_tools.py
Adds surface and deformation-field smoothing helpers and removes the TransformTools USD visualization implementation.
Tutorial 10 prediction and USD assembly
tutorials/tutorial_10_byod_eval_physicsnemo_mgn.py
Uses checkpoint epoch 1500, converts predicted surfaces into a 4D USD project, and returns its path.
Tutorial 11 combined-motion volume generation
tutorials/tutorial_11_heart_and_lung_motion.py
Blends displacement fields, writes warped CT and labelmap volumes per frame, manages field caching, and includes volume paths in results.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

Tutorial 11 combined-motion volume flow

sequenceDiagram
  participant Tutorial11
  participant DisplacementFields
  participant CTVolume
  participant LabelmapVolume
  participant CombinedOutputs
  Tutorial11->>DisplacementFields: bilinearly blend phase and stage fields
  DisplacementFields-->>Tutorial11: cached combined field
  Tutorial11->>CTVolume: warp CT with linear interpolation
  Tutorial11->>LabelmapVolume: warp labelmap with nearest-neighbor sampling
  CTVolume-->>CombinedOutputs: combined_ct_###.mha
  LabelmapVolume-->>CombinedOutputs: combined_labelmap_###.mha
Loading

Possibly related PRs

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately captures the main change: generating 4D CT and labelmap outputs for lung and heart motion.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aylward
aylward force-pushed the ct_and_landmarks_4d branch from abdec2c to 75c1de7 Compare July 23, 2026 13:17
Copilot AI review requested due to automatic review settings July 23, 2026 13:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@aylward aylward changed the title ENH: Produce 4D landmark and CT for lung and heart motion ENH: Produce 4D labelmap and CT images with lung and heart motion Jul 24, 2026
@aylward
aylward merged commit 7d73044 into Project-MONAI:main Jul 24, 2026
10 checks passed
@aylward
aylward deleted the ct_and_landmarks_4d branch July 24, 2026 14:49
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.

2 participants