# HG changeset patch # User Alain Mazy # Date 1762169993 -3600 # Node ID 8d0285378ed79644d9ac079595dba6b4749c9c95 # Parent 266b0b912c356e660c7c0ec31d2a0b6dbc202383 Use 'ImagerPixelSpacing' (0018,1164) tag if 'PixelSpacing' is missing diff -r 266b0b912c35 -r 8d0285378ed7 Applications/StoneWebViewer/NEWS --- 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) diff -r 266b0b912c35 -r 8d0285378ed7 OrthancStone/Sources/Toolbox/GeometryToolbox.cpp --- 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 diff -r 266b0b912c35 -r 8d0285378ed7 TODO --- 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.