diff Framework/Toolbox/DicomInstanceParameters.cpp @ 1207:17a92c39c633 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Dec 2019 12:29:06 +0100
parents 19b1c8caade4 c93a6218f0cd
children 0ca50d275b9a
line wrap: on
line diff
--- a/Framework/Toolbox/DicomInstanceParameters.cpp	Mon Dec 02 14:32:05 2019 +0100
+++ b/Framework/Toolbox/DicomInstanceParameters.cpp	Tue Dec 03 12:29:06 2019 +0100
@@ -420,7 +420,19 @@
         texture->SetCustomWindowing(data_.defaultWindowingCenter_,
                                     data_.defaultWindowingWidth_);
       }
-        
+      
+
+      if (data_.imageInformation_.GetPhotometricInterpretation()
+        == Orthanc::PhotometricInterpretation_Monochrome1)
+      {
+        texture->SetInverted(true);
+      }
+      else if (data_.imageInformation_.GetPhotometricInterpretation()
+        == Orthanc::PhotometricInterpretation_Monochrome2)
+      {
+        texture->SetInverted(false);
+      }
+
       return texture.release();
     }
   }