comparison Framework/Radiography/RadiographyWidget.cpp @ 860:238693c3bc51 am-dev

merge default -> am-dev
author Alain Mazy <alain@mazy.be>
date Mon, 24 Jun 2019 14:35:00 +0200
parents be9c1530d40a
children b537002f83a9 d33ae2b0db9d
comparison
equal deleted inserted replaced
856:a6e17a5a39e7 860:238693c3bc51
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;