diff Framework/Toolbox/DicomInstanceParameters.cpp @ 1221:e2435a524029

merge
author Alain Mazy <alain@mazy.be>
date Sat, 07 Dec 2019 17:47:35 +0100
parents c93a6218f0cd
children 17a92c39c633 2d8ab34c8c91
line wrap: on
line diff
--- a/Framework/Toolbox/DicomInstanceParameters.cpp	Sat Dec 07 17:47:23 2019 +0100
+++ b/Framework/Toolbox/DicomInstanceParameters.cpp	Sat Dec 07 17:47:35 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();
     }
   }