fix(gsps): restrict multi-frame overlays to referenced frames#31
fix(gsps): restrict multi-frame overlays to referenced frames#31
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changes add frame-specific GSPS overlay support: graphics are stored with optional referenced frames, parsing was refactored to track frame references, and rendering now filters and draws only graphics for the current frame index. Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/dicom.rs`:
- Around line 397-410: The current chain turns a present-but-unusable
ReferencedFrameNumber tag into None by filtering out empty vectors, causing
graphics_for_frame() to treat it as “all frames”; instead preserve presence by
returning Some(empty_vec) when all values are filtered out. Locate the
referenced_frames construction using read_item_multi_int and
REFERENCED_FRAME_NUMBER and remove the .filter(|frames| !frames.is_empty()) step
so the code only maps to a Vec<usize> (sorting/deduping) and returns Some(vec)
even if empty; ensure downstream graphics_for_frame() can detect Some(vec![]) as
“no frames” rather than None meaning “all frames.”
Summary by CodeRabbit
New Features
Improvements
Tests