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(tools): Add support for additional region data types and length variants #1736

Merged

Conversation

jmannau
Copy link
Contributor

@jmannau jmannau commented Jan 6, 2025

Context

Note: Updates original PR #1629 with formatting updates.

Update SUPPORTED_REGION_DATA_TYPES, SUPPORTED_LENGTH_VARIANT and SUPPORTED_PROBE_VARIANT in
packages/tools/src/utilities/getCalibratedUnits.ts

Given the dicom standards here, it would be beneficial to update the package with these values so as to allow dicom scans to reference the correct measurements.

Changes & Results

Added Color Flow, PW Spectral Doppler and CW Spectral Doppler to SUPPORTED_REGION_DATA_TYPES
Added x: seconds & y : cm/sec to SUPPORTED_LENGTH_VARIANT and SUPPORTED_PROBE_VARIANT
Relevant Dicom MetaData Tags

(0008,0005) CS [ISO_IR 6]                               #   8, 1 SpecificCharacterSet
(0008,0016) UI =UltrasoundImageStorage                  #  28, 1 SOPClassUID
(0018,6011) SQ (Sequence with explicit length #=2)      # 396, 1 SequenceOfUltrasoundRegions
  (fffe,e000) na (Item with explicit length #=15)         # 180, 1 Item
    (0018,6012) US 1                                        #   2, 1 RegionSpatialFormat
    (0018,6014) US 2                                        #   2, 1 RegionDataType
    (0018,6016) UL 0                                        #   4, 1 RegionFlags
    (0018,6018) UL 378                                      #   4, 1 RegionLocationMinX0
    (0018,601a) UL 50                                       #   4, 1 RegionLocationMinY0
    (0018,601c) UL 636                                      #   4, 1 RegionLocationMaxX1
    (0018,601e) UL 254                                      #   4, 1 RegionLocationMaxY1
    (0018,6020) SL 130                                      #   4, 1 ReferencePixelX0
    (0018,6022) SL 0                                        #   4, 1 ReferencePixelY0
    (0018,6024) US 3                                        #   2, 1 PhysicalUnitsXDirection
    (0018,6026) US 3                                        #   2, 1 PhysicalUnitsYDirection
    (0018,602c) FD 0.078048778743278699                     #   8, 1 PhysicalDeltaX
    (0018,602e) FD 0.078048778743278691                     #   8, 1 PhysicalDeltaY
    (0018,6030) UL 1670                                     #   4, 1 TransducerFrequency
    (0018,6032) UL 4357                                     #   4, 1 PulseRepetitionFrequency
  (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
  (fffe,e000) na (Item with explicit length #=16)         # 200, 1 Item
    (0018,6012) US 3                                        #   2, 1 RegionSpatialFormat
    (0018,6014) US 4                                        #   2, 1 RegionDataType
    (0018,6016) UL 2                                        #   4, 1 RegionFlags
    (0018,6018) UL 50                                       #   4, 1 RegionLocationMinX0
    (0018,601a) UL 262                                      #   4, 1 RegionLocationMinY0
    (0018,601c) UL 913                                      #   4, 1 RegionLocationMaxX1
    (0018,601e) UL 721                                      #   4, 1 RegionLocationMaxY1
    (0018,6020) SL 864                                      #   4, 1 ReferencePixelX0
    (0018,6022) SL 89                                       #   4, 1 ReferencePixelY0
    (0018,6024) US 4                                        #   2, 1 PhysicalUnitsXDirection
    (0018,6026) US 7                                        #   2, 1 PhysicalUnitsYDirection
    (0018,6028) FD 4.95498055009321                         #   8, 1 ReferencePixelPhysicalValueX
    (0018,602a) FD 0                                        #   8, 1 ReferencePixelPhysicalValueY
    (0018,602c) FD 0.0023148148148148144                    #   8, 1 PhysicalDeltaX
    (0018,602e) FD -1.7255434782608694                      #   8, 1 PhysicalDeltaY
    (0018,6032) UL 46296                                    #   4, 1 PulseRepetitionFrequency
  (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem

Screen short of measurement tools before change

390276371-c182419b-6bf7-42a6-ae61-b9491217564e-2

Screen short of measurement tools after change

390276384-1309389b-7ff1-40cb-acde-094627e56b68

Existing values will not be changed only added to. Therefore no change to exisiting functionality, only added support for dicom image metadata.

Testing

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: macOS 15.1.1"
  • "Node version: v20.15.1"
  • "Browser: Brave 1.73.89 Chromium: 131.0.6778.69"

Copy link

stackblitz bot commented Jan 6, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for cornerstone-3d-docs failed. Why did it fail? →

Name Link
🔨 Latest commit 2fbe67f
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/677c56d6dffb2d000888d9e7

@jmannau jmannau marked this pull request as ready for review January 6, 2025 22:33
@sedghi sedghi merged commit 397dea0 into cornerstonejs:main Jan 7, 2025
22 of 26 checks passed
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.

3 participants