comparison Applications/Samples/SingleFrameEditorApplication.h @ 363:54ae0577f5bb am-2

fix anisotropic pixel spacing
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Oct 2018 18:55:52 +0100
parents 12cec26d08ce
children aad2f9293089
comparison
equal deleted inserted replaced
362:12cec26d08ce 363:54ae0577f5bb
2785 2785
2786 json["Tags"][Orthanc::DICOM_TAG_PHOTOMETRIC_INTERPRETATION.Format()] = 2786 json["Tags"][Orthanc::DICOM_TAG_PHOTOMETRIC_INTERPRETATION.Format()] =
2787 (widget.IsInvert() ? "MONOCHROME1" : "MONOCHROME2"); 2787 (widget.IsInvert() ? "MONOCHROME1" : "MONOCHROME2");
2788 2788
2789 2789
2790 // WARNING: The order of PixelSpacing is Y/X
2790 char buf[32]; 2791 char buf[32];
2791 sprintf(buf, "%0.08f\\%0.08f", pixelSpacingX, pixelSpacingY); 2792 sprintf(buf, "%0.08f\\%0.08f", pixelSpacingY, pixelSpacingX);
2792 2793
2793 json["Tags"][Orthanc::DICOM_TAG_PIXEL_SPACING.Format()] = buf; 2794 json["Tags"][Orthanc::DICOM_TAG_PIXEL_SPACING.Format()] = buf;
2794 2795
2795 float center, width; 2796 float center, width;
2796 if (widget.GetStack().GetWindowing(center, width)) 2797 if (widget.GetStack().GetWindowing(center, width))