comparison Framework/Layers/RenderStyle.cpp @ 142:f19194a11c1d wasm

ComputeWindowing in Enumerations.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Jan 2018 18:12:42 +0100
parents e2fe9352f240
children fccffbf99ba1
comparison
equal deleted inserted replaced
141:88bca952cb17 142:f19194a11c1d
47 void RenderStyle::ComputeWindowing(float& targetCenter, 47 void RenderStyle::ComputeWindowing(float& targetCenter,
48 float& targetWidth, 48 float& targetWidth,
49 float defaultCenter, 49 float defaultCenter,
50 float defaultWidth) const 50 float defaultWidth) const
51 { 51 {
52 switch (windowing_) 52 if (windowing_ == ImageWindowing_Custom)
53 { 53 {
54 case ImageWindowing_Default: 54 targetCenter = customWindowCenter_;
55 targetCenter = defaultCenter; 55 targetWidth = customWindowWidth_;
56 targetWidth = defaultWidth; 56 }
57 break; 57 else
58 58 {
59 case ImageWindowing_Bone: 59 return ::OrthancStone::ComputeWindowing
60 targetCenter = 300; 60 (targetCenter, targetWidth, windowing_, defaultCenter, defaultWidth);
61 targetWidth = 2000;
62 break;
63
64 case ImageWindowing_Lung:
65 targetCenter = -600;
66 targetWidth = 1600;
67 break;
68
69 case ImageWindowing_Custom:
70 targetCenter = customWindowCenter_;
71 targetWidth = customWindowWidth_;
72 break;
73
74 default:
75 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
76 } 61 }
77 } 62 }
78 63
79 64
80 void RenderStyle::SetColor(uint8_t red, 65 void RenderStyle::SetColor(uint8_t red,