dcmjs-org / dcmjs

Javascript implementation of DICOM manipulation
https://dcmjs.netlify.com/
MIT License
293 stars 111 forks source link

Feature add cornerstone adapters #225

Closed wayfarer3130 closed 2 years ago

wayfarer3130 commented 2 years ago

This change adds cornerstone adapters for a number of missing versions:

  1. Cobb Angle
  2. Angle
  3. RectangleRoi
  4. FreehandRoi

Some of these previously had code with "todo" in it, but no actual functionality.

The change also makes additional items bi-direction, in specific, the finding and findingSite values are now used to generate description and location values in cornerstone.

pieper commented 2 years ago

@wayfarer3130 how does the work here relate to https://github.com/dcmjs-org/dcmjs/pull/197 ? Are they complementary and consistent?

wayfarer3130 commented 2 years ago

@wayfarer3130 how does the work here relate to #197 ? Are they complementary and consistent?

They are mostly complementary - there are a small number of overlapping changes, although this change makes #197 smaller because it puts a bunch of the work for #197 into a single location where it can just be done consistently.

dclunie commented 2 years ago

@wayfarer3130 @swederik @JamesAPetts @igoroctaviano @galelis I noticed that the SR measurements code is checking CodeValue without checking CodingSchemeDesignator (e.g., contentSequenceArr.find(group => group.ConceptNameCodeSequence.CodeValue === FINDING) where FINDING_SITE = "G-C0E3".

This is bad practice - one should always check both value and scheme, since there is no guarantee that the same code will not be used in different schemes for different concepts (and indeed one should check for SRT, SNM3 and 99SDM if you want to be really robust).

Further, you should be using SCT not SRT codes on writing (but checking for either on reading for legacy support), e.g., SCT: 363698007 should be written rather than SCT: G-C0E3, in order to be compliant with CP 1850 and to keep the SNOMED licensing folks happy.

wayfarer3130 commented 2 years ago

Thanks @dclunie , I've made the changes to use the SCT codes rather than the SRT codes, and also to match on both coding scheme designator and code value instead of just code value. The old SRT codes are also accepted.

wayfarer3130 commented 2 years ago

Accidentally hit close instead of comment

igoroctaviano commented 2 years ago

@pieper tested against OHIF, LGTM.

ohif-bot commented 2 years ago

:tada: This PR is included in version 0.19.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: