Skip to content

fix: Ensure FOR is stored when required and cachedStats created #2237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2025

Conversation

wayfarer3130
Copy link
Collaborator

Context

Some of the annotation adapters weren't storing referenced frame of reference uid, nor were they creating cached stats.
Add both items automatically when appropriate.

Changes & Results

Add Ref FOR for 3d measurements
Add cached stats always

Testing

Link into OHIF and save 3d annotations.

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:
  • [] "Node version:
  • [] "Browser:

@wayfarer3130 wayfarer3130 requested a review from sedghi July 30, 2025 16:19
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change just avoids needing to merge version.ts all the time. It will get recreated from package.json

@@ -80,9 +80,6 @@ export default class Length extends BaseAdapter3D {
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
finding,
findingSites: findingSites || [],
ReferencedFrameOfReferenceUID: is3DMeasurement
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is moved to MeasurementReport.ts

@@ -185,6 +185,10 @@ export default class MeasurementReport {
is3DMeasurement
);
args.ReferencedSOPSequence = ReferencedSOPSequence;
if (args.use3DSpatialCoordinates) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This fixes the load of MPR measurements generally.

@@ -328,6 +332,7 @@ export default class MeasurementReport {
annotation: {
data: {
annotationUID,
cachedStats: {},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This fixes missing cachedStats generally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Recreated from package.json on each build.

@wayfarer3130 wayfarer3130 merged commit 35062da into main Jul 30, 2025
9 checks passed
@wayfarer3130 wayfarer3130 deleted the fix/adapter-missing-mpr-save branch July 30, 2025 16:32
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