Skip to content

fix(sr): adapt 3.10 SR reports to new DCMJS structural changes#2643

Open
Belbin-GK wants to merge 1 commit into
cornerstonejs:mainfrom
Belbin-GK:fix/sr-backward-compatibility-dcmjs
Open

fix(sr): adapt 3.10 SR reports to new DCMJS structural changes#2643
Belbin-GK wants to merge 1 commit into
cornerstonejs:mainfrom
Belbin-GK:fix/sr-backward-compatibility-dcmjs

Conversation

@Belbin-GK
Copy link
Copy Markdown
Contributor

@Belbin-GK Belbin-GK commented Mar 4, 2026

Context

  • Restore SR reports created in 3.10 with updated DCMJS structural changes

Changes & Results

  • Updated SR parsing to match latest DCMJS changes
  • Added backward compatibility for older SRs
  • Fixed unit handling (removed incorrect default units)
  • Corrected measurement statistics extraction
  • Prevented invalid stats (e.g., area for open shapes)
  • Ensured proper annotation loading from SR
  • Maintained consistency of stats and units after SR reload

Before changes:

SR_creation_without_changes.mp4
SR_load_without_changes.mp4
SR_MR_Load_without_changes.mp4

After changes:

SR_creation_and_load_with_changes.mp4
SR_creation_load_MR_with_changes.mp4

Testing

  • Load a study
  • Draw a Rectangle ROI measurement and verify its statistics units
  • Save the measurement as an SR
  • Reload the saved SR and verify that the rectangle’s statistics units are preserved correctly
  • Repeat the validation using MR modality data
  • Verify the behavior with the following tools:
    • Length
    • Bidirectional
    • Annotate
    • Rectangle ROI
    • Freehand ROI
    • Ellipse ROI
    • Circle

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • "OS: Windows 11
  • "Node version: 22.20.0
  • "Browser: Chrome 145.0.7632.119

@Belbin-GK Belbin-GK marked this pull request as ready for review March 4, 2026 15:31
@sen-trenser
Copy link
Copy Markdown

@sedghi Could you please take a look at this and provide feedbacks?

@sen-trenser
Copy link
Copy Markdown

@wayfarer3130 Could you please take a look at this PR and provide your feedbacks?

@wayfarer3130
Copy link
Copy Markdown
Collaborator

Can you update after the adapters reformat is merged, and I will take a look.
Please update hte description to describe what you changes and how I test it. I know you have videos, but I'd like to see a text description so I know what you consider important and not what I might infer from the video

@Belbin-GK Belbin-GK force-pushed the fix/sr-backward-compatibility-dcmjs branch from 6429191 to dfb5998 Compare May 4, 2026 12:32
@Belbin-GK
Copy link
Copy Markdown
Contributor Author

Can you update after the adapters reformat is merged, and I will take a look. Please update hte description to describe what you changes and how I test it. I know you have videos, but I'd like to see a text description so I know what you consider important and not what I might infer from the video

@wayfarer3130 I’ve updated the PR. Could you please review it?

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.

4 participants