Skip to content
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

fix(PT measurement units): Non-SUV scaled, but pre-scaled PTs should show proper units #686

Conversation

jbocce
Copy link
Collaborator

@jbocce jbocce commented Jul 12, 2023

Context

The various ROI measurements (i.e. rectangle, ellipse, circle, etc.) on non-SUV scaled PTs were showing no units at all. Instead, the units should come from DICOM (0054,1001)/units tag.

SUV scaled PTs should continue to show 'SUV' as the units.

Changes & Results

Non-SUV scaled, but pre-scaled PTs show the units from the DICOM (0054,1001)/units tag.
SUV scaled PTs show SUV units.
The modality unit displayed as part of the measurement is now also added to the cached stats and fired with the ANNOTATION_ADDED event.

Testing

Add an ROI measurement to a PT and depending on its scaling, the appropriate unit should display for the statistics units.

Checklist

PR

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

Code

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: 16.14.0
  • "Browser: Chrome 114.0.5735.199

Non-SUV scaled, but pre-scaled PTs show the units from the DICOM (0054,1001)/units tag.
@netlify
Copy link

netlify bot commented Jul 12, 2023

Deploy Preview for cornerstone-3d-docs ready!

Name Link
🔨 Latest commit 43b0376
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/64af00f36cc33f0008a68ef6
😎 Deploy Preview https://deploy-preview-686--cornerstone-3d-docs.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 site configuration.

Copy link
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

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

see my comments please

jbocce added 2 commits July 12, 2023 15:24
- introduced ModalityUnitOptions to pass around isSuvScale and isPreScaled
- refactored getModalityUnit function for readability
@sedghi sedghi merged commit e9190df into cornerstonejs:main Jul 13, 2023
@jbocce jbocce deleted the fix/include-mean-max-stddev-unit-to-measurements branch July 13, 2023 15:50
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