Add cm to the known UCUM units - #506
Open
afip94 wants to merge 1 commit into
Open
Conversation
A length measured in centimetres - the normal case for ultrasound images
calibrated through SequenceOfUltrasoundRegions, where
PhysicalUnitsXDirection = 3 means cm - had no entry in knownUnits and fell
through to the arbitrary-unit branch, ending up as [arb'U]{cm} /
"arbitrary cm" in the stored SR.
Fixes dcmjs-org#505
✅ Deploy Preview for dcmjs2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
cmtoknownUnitsinunit2CodingValue, as discussed in #505.A length measured in centimetres — the normal case for ultrasound images calibrated through
SequenceOfUltrasoundRegions, wherePhysicalUnitsXDirection = 3means cm — had no entry and fell through to the arbitrary-unit branch, so the stored SR carriedCodeValue: "[arb'U]{cm}"/CodeMeaning: "arbitrary cm".Also adds
test/unit2CodingValue.test.jscovering:mm(unchanged behaviour),cmresolving to the UCUM code rather than an arbitrary unit,"cm US Region"resolving via the existing base-unit fallback — that is the label Cornerstone3D produces for calibrated ultrasound measurements,[arb'U]{…}.Verified that the two new assertions fail without the one-line addition.
The full suite passes with
--runInBand. Running it in parallel produced three unrelated failures intest/async-data.test.json my machine, which also pass in isolation — looks like a race over the shared downloaded fixtures rather than anything from this change.