fix(dicom-json): correct frame indexing and clarify metadata requirements#6120
fix(dicom-json): correct frame indexing and clarify metadata requirements#6120driavysinus wants to merge 2 commits into
Conversation
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughDICOM JSON documentation now describes required metadata, rendering and modality-specific tags, and DICOM JSON-specific rules for frame indexing and URL placement. The generator script now emits zero-based frame URLs for multi-frame instances. ChangesDICOM JSON generator and frame URL behavior
DICOM JSON metadata guidance docs
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: documentation Suggested reviewers: None identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@platform/docs/docs/configuration/dataSources/dicom-json.md`:
- Around line 45-46: The DICOM JSON docs wording is misleading because the
script does not create SR metadata; it only preserves existing SR-related fields
when they are already present in the source metadata. Update the copy in
dicom-json.md around the metadata guidance to say the script retains or carries
over CodeSequences for SR when available, rather than saying it will add them,
and keep the explanation aligned with the generator behavior.
In
`@platform/docs/versioned_docs/version-3.11/configuration/dataSources/dicom-json.md`:
- Around line 48-52: The DICOM JSON generator is emitting one-based frame URLs
while the docs specify that frame indexing must be zero-based. Update the logic
in the DICOM JSON generation path, especially the code that builds the
multi-frame URL in dicom-json-generator.js, so it uses frame values starting at
0 rather than 1. Keep the URL construction consistent wherever the frame query
parameter is generated, and verify any related frame loops or counters are
adjusted to match.
- Around line 45-46: The DICOM JSON documentation currently implies the script
generates SR metadata, but it should state that the script preserves and
forwards existing SR sequences from the source metadata instead. Update the
wording around the script description and the SR example to make it clear that
sequences such as ConceptNameCodeSequence are retained for display, not created
by the script.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 93a3c449-0635-4da1-9aaa-6d3febe1877d
📒 Files selected for processing (4)
platform/docs/docs/configuration/dataSources/dicom-json.mdplatform/docs/docs/faq/technical.mdplatform/docs/versioned_docs/version-3.11/configuration/dataSources/dicom-json.mdplatform/docs/versioned_docs/version-3.11/faq/technical.md
Context
Related to #3093.
The required metadata FAQ already documents the broad set of fields OHIF needs, but DICOM JSON users still have to decide which metadata to keep when reducing JSON payload size. This update clarifies the practical baseline metadata and modality-specific fields needed for display set creation, rendering, sorting, cine, ultrasound, PT SUV correction, SEG, RTSTRUCT, SR, PDF, and video handling.
Changes & Results
PlanarConfigurationfor color/RGB images,NumberOfFramesfor multi-frame objects, and zero-basedframequery parameters.version-3.11docs copy.Testing
git diff --checkcorepack pnpm dlx prettier@3.6.2 --check platform/docs/docs/faq/technical.md platform/docs/docs/configuration/dataSources/dicom-json.md platform/docs/versioned_docs/version-3.11/faq/technical.md platform/docs/versioned_docs/version-3.11/configuration/dataSources/dicom-json.mdFull docs build was not run because the monorepo dependencies were not installed locally.
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
Summary by CodeRabbit
Documentation
NumberOfFramesinclusion and zero-basedframeURL indexing.Bug Fixes