comparison Framework/Radiography/RadiographyWidget.cpp @ 739:be9c1530d40a

deprecating enum SliceImageQuality
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 22 May 2019 09:13:04 +0200
parents 4f2416d519b4
children b537002f83a9 d33ae2b0db9d
comparison
equal deleted inserted replaced
738:8e31b174ab26 739:be9c1530d40a
33 bool RadiographyWidget::IsInvertedInternal() const 33 bool RadiographyWidget::IsInvertedInternal() const
34 { 34 {
35 // MONOCHROME1 images must be inverted and the user can invert the 35 // MONOCHROME1 images must be inverted and the user can invert the
36 // image, too -> XOR the two 36 // image, too -> XOR the two
37 return (scene_->GetPreferredPhotomotricDisplayMode() == 37 return (scene_->GetPreferredPhotomotricDisplayMode() ==
38 PhotometricDisplayMode_Monochrome1) ^ invert_; 38 RadiographyPhotometricDisplayMode_Monochrome1) ^ invert_;
39 } 39 }
40 40
41 void RadiographyWidget::RenderBackground( 41 void RadiographyWidget::RenderBackground(
42 Orthanc::ImageAccessor& image, float minValue, float maxValue) 42 Orthanc::ImageAccessor& image, float minValue, float maxValue)
43 { 43 {
44 // wipe background before rendering 44 // wipe background before rendering
45 float backgroundValue = minValue; 45 float backgroundValue = minValue;
46 46
47 switch (scene_->GetPreferredPhotomotricDisplayMode()) 47 switch (scene_->GetPreferredPhotomotricDisplayMode())
48 { 48 {
49 case PhotometricDisplayMode_Monochrome1: 49 case RadiographyPhotometricDisplayMode_Monochrome1:
50 case PhotometricDisplayMode_Default: 50 case RadiographyPhotometricDisplayMode_Default:
51 if (IsInvertedInternal()) 51 if (IsInvertedInternal())
52 backgroundValue = maxValue; 52 backgroundValue = maxValue;
53 else 53 else
54 backgroundValue = minValue; 54 backgroundValue = minValue;
55 break; 55 break;
56 case PhotometricDisplayMode_Monochrome2: 56 case RadiographyPhotometricDisplayMode_Monochrome2:
57 if (IsInvertedInternal()) 57 if (IsInvertedInternal())
58 backgroundValue = minValue; 58 backgroundValue = minValue;
59 else 59 else
60 backgroundValue = maxValue; 60 backgroundValue = maxValue;
61 break; 61 break;