Mercurial > hg > orthanc-stone
changeset 2243:8d0285378ed7 default tip
Use 'ImagerPixelSpacing' (0018,1164) tag if 'PixelSpacing' is missing
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Mon, 03 Nov 2025 12:39:53 +0100 |
| parents | 266b0b912c35 |
| children | |
| files | Applications/StoneWebViewer/NEWS OrthancStone/Sources/Toolbox/GeometryToolbox.cpp TODO |
| diffstat | 3 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Applications/StoneWebViewer/NEWS Wed Jul 09 12:55:20 2025 +0200 +++ b/Applications/StoneWebViewer/NEWS Mon Nov 03 12:39:53 2025 +0100 @@ -12,12 +12,14 @@ * New configuration options "AnnotationsColor" and "HighlightedAnnotationsColor" to change the color of annotations + Maintenance ----------- * Automatically stretch to whole range for images without windowing preset * Improved support of the (0028,9132) tag for Philips multiframe images * Fix loading of US images with a negative PhyiscalDeltaX value +* Use "ImagerPixelSpacing" (0018,1164) tag if "PixelSpacing" is missing Version 2.6 (2024-08-31)
--- a/OrthancStone/Sources/Toolbox/GeometryToolbox.cpp Wed Jul 09 12:55:20 2025 +0200 +++ b/OrthancStone/Sources/Toolbox/GeometryToolbox.cpp Mon Nov 03 12:39:53 2025 +0100 @@ -310,7 +310,6 @@ const Orthanc::DicomMap& dicom) { Vector v; - if (LinearAlgebra::ParseVector(v, dicom, Orthanc::DICOM_TAG_PIXEL_SPACING) && v.size() >= 2 && v[0] > 0 && @@ -321,6 +320,16 @@ spacingY = v[0]; return true; } + else if (LinearAlgebra::ParseVector(v, dicom, Orthanc::DICOM_TAG_IMAGER_PIXEL_SPACING) && + v.size() >= 2 && + v[0] > 0 && + v[1] > 0) + { + // WARNING: X/Y are swapped (Y comes first) + spacingX = v[1]; + spacingY = v[0]; + return true; + } else { // The "PixelSpacing" is of type 1C: It could be absent, use
--- a/TODO Wed Jul 09 12:55:20 2025 +0200 +++ b/TODO Mon Nov 03 12:39:53 2025 +0100 @@ -24,8 +24,6 @@ * Display GSPS layers (Grayscale Softcopy Presentation State). -* Use "ImagerPixelSpacing" (0018,1164) tag if "PixelSpacing" is missing - * Override which tags are displayed in the image information in the top-left, top-right and bottom-right pannels.
