Skip to content

Add helper to create ring VOIs#917

Open
acsevillam wants to merge 1 commit into
e0404:devfrom
acsevillam:pr/create-ring-helper
Open

Add helper to create ring VOIs#917
acsevillam wants to merge 1 commit into
e0404:devfrom
acsevillam:pr/create-ring-helper

Conversation

@acsevillam

Copy link
Copy Markdown
Contributor

Feature description

This PR adds a small geometry helper to create ring VOIs from existing structures. The helper builds a ring as an outer margin minus an inner margin around a base VOI, then clips the result to a limiting VOI.

The goal is to provide a reusable utility for structure preparation workflows without coupling it to a specific patient, script, or optimization strategy.

Approach

  • Adds matRad_createRing under matRad/geometry.
  • Supports all CT scenarios available in ct.numOfCtScen.
  • Uses existing matRad_addMargin behavior for margin expansion.
  • Returns the updated cst and the row index of the created ring VOI.
  • Adds MOxUnit coverage for:
    • creating an outer-minus-inner ring,
    • excluding the base VOI from the ring,
    • clipping the ring to a limiting VOI.

No new global defaults are introduced, and no external dependencies or toolboxes are required.

Open Questions and/or Concerns

  • CI should confirm the new geometry test on the supported MATLAB/Octave environments.

References

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 matRad | 🛠️ Build #32912336 | 📁 Comparing 07972af against latest (5a43850)

  🔍 Preview build  

19 files changed · + 1 added · ± 18 modified

+ Added

± Modified

@codecov

codecov Bot commented May 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.12500% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.00%. Comparing base (174e756) to head (07972af).
⚠️ Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
matRad/geometry/matRad_createRing.m 78.12% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #917      +/-   ##
==========================================
+ Coverage   54.96%   55.00%   +0.03%     
==========================================
  Files         322      323       +1     
  Lines       20618    20650      +32     
==========================================
+ Hits        11333    11358      +25     
- Misses       9285     9292       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

Copy link
Copy Markdown

Test Results

    3 files  ±0      3 suites  ±0   32m 17s ⏱️ +5s
  369 tests +2    369 ✅ +2  0 💤 ±0  0 ❌ ±0 
1 203 runs  +6  1 198 ✅ +6  5 💤 ±0  0 ❌ ±0 

Results for commit 07972af. ± Comparison against base commit 174e756.

@github-actions

Copy link
Copy Markdown

This PR was automatically marked as stale it has been open 30 days with no activity. Please review/update/merge this PR.

@github-actions github-actions Bot added stale Automatic label for stale issues and removed stale Automatic label for stale issues labels Jun 29, 2026
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.

1 participant