Read ultrasound spacing from SequenceOfUltrasoundRegions#863
Open
PaulHax wants to merge 5 commits intoKitware:mainfrom
Open
Read ultrasound spacing from SequenceOfUltrasoundRegions#863PaulHax wants to merge 5 commits intoKitware:mainfrom
PaulHax wants to merge 5 commits intoKitware:mainfrom
Conversation
✅ Deploy Preview for volview-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
7893a24 to
b505b0e
Compare
b505b0e to
fed8bf2
Compare
2 tasks
Per DICOM PS3.3 C.8.5.5.1.15, code 3 (cm) is the only spatial spacing unit defined for PhysicalUnitsXDirection / YDirection — codes 0, 1, 2, 4–10 cover none / percent / dB / seconds / hertz / dB/sec / cm/sec / cm² / cm²/sec / degrees. Replace the strict cm equality check with a unitToMm helper that returns 10 for cm and null for everything else, applied per axis. Functionally equivalent to the previous strict check, but isolates the unit-to-spacing mapping in one tested place and adds a clear extension point if a vendor exception ever needs to be honoured.
VTK image data has a single global spacing, so a multi-region ultrasound (e.g. dual-pane B-mode + Doppler) cannot be fully represented. Surface the total region count alongside the first region's spacing and warn in the console when more than one region exists, so the partial-coverage limitation is visible rather than silent.
Stop encoding UltrasoundRegions as a JSON string under a magic key on the DICOM tag pair array and decoding it back. Expose it as a typed property on MetaLoader, surface it on Chunk, and read it directly in DicomChunkImage. The tag pair array now only contains DICOM tag/value pairs.
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.
Applies PhysicalDeltaX/Y (cm) from the first US region to the VTK image spacing when modality is US, so rulers show physical mm instead of pixel counts.
Ultrasound DICOM files:
https://raw.githubusercontent.com/pydicom/pydicom/main/src/pydicom/data/test_files/examples_ybr_color.dcm
https://raw.githubusercontent.com/pydicom/pydicom-data/master/data_store/data/color3d_jpeg_baseline.dcm