diff Framework/Toolbox/SortedFrames.cpp @ 1490:5d892f5dd9c4

SortedFrames::IsFrameMonochrome1()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 Jun 2020 17:17:06 +0200
parents 60be4627ae52
children
line wrap: on
line diff
--- a/Framework/Toolbox/SortedFrames.cpp	Tue Jun 23 07:50:14 2020 +0200
+++ b/Framework/Toolbox/SortedFrames.cpp	Wed Jun 24 17:17:06 2020 +0200
@@ -21,9 +21,10 @@
 
 #include "SortedFrames.h"
 
-#include <OrthancException.h>
+#include "GeometryToolbox.h"
 
-#include "GeometryToolbox.h"
+#include <OrthancException.h>
+#include <Toolbox.h>
 
 namespace OrthancStone
 {
@@ -46,6 +47,17 @@
       numberOfFrames_ = 1;
     }
 
+    std::string photometric;
+    if (tags.LookupStringValue(photometric, Orthanc::DICOM_TAG_PHOTOMETRIC_INTERPRETATION, false))
+    {
+      Orthanc::Toolbox::StripSpaces(photometric);
+      monochrome1_ = (photometric == "MONOCHROME1");
+    }
+    else
+    {
+      monochrome1_ = false;
+    }
+
     hasPosition_ = (
       LinearAlgebra::ParseVector(position_, tags, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT) &&
       position_.size() == 3 &&