Skip to content

Conversation

@deepakri201
Copy link

@deepakri201 deepakri201 commented Jan 29, 2026

Context

Using the usAnnotation extension, clinicians often first perform a rough assessment of a particular ultrasound clip by visually identifying the frame with the maximum number of B-lines. Later, the clinician or a fellow may add in pleural line and B-line annotations. However, in the current extension, the user cannot save an annotation JSON file without adding the pleural lines and B-lines.

Changes & Results

Therefore, we added the ability to save out a JSON annotation file, even if no pleural lines or B-lines are present in the frame. The JSON file will contain an entry with the current frame number, and an empty list for both the pleural lines and B-lines.

A sample resulting JSON file is as follows:

{
  "SOPInstanceUID": "1.2.840.113663.1500.1.248223208.3.1.20110323.110042.375",
  "GrayscaleConversion": false,
  "mask_type": "fan",
  "angle1": 47.37832997335552,
  "angle2": 132.7093899573615,
  "center_rows_px": 419.9508448540707,
  "center_cols_px": 94.38658474142345,
  "radius1": 26.654419138056458,
  "radius2": 469.68489213060354,
  "AnnotationLabels": [],
  "frame_annotations": {
    "24": {
      "pleura_lines": [],
      "b_lines": []
    }
  }
}

Testing

This change can be tested by:

  • searching for US images
  • selecting a study (e.g cardiac)
  • scrolling to a particular frame
  • clicking the download JSON button in the "Annotated Frames" section

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: macOS 14.7.3
  • Node version: 25.5.0
  • Browser: Chrome 142.0.7444.60

@netlify
Copy link

netlify bot commented Jan 29, 2026

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit 1419da5
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/697b845a80b5860008656728
😎 Deploy Preview https://deploy-preview-5758--ohif-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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