Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/FloatTextureSceneLayer.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 | 0387485f048b |
children | 4d1f57773b5b |
comparison
equal
deleted
inserted
replaced
856:a6e17a5a39e7 | 860:238693c3bc51 |
---|---|
25 #include <Core/Images/ImageProcessing.h> | 25 #include <Core/Images/ImageProcessing.h> |
26 #include <Core/OrthancException.h> | 26 #include <Core/OrthancException.h> |
27 | 27 |
28 namespace OrthancStone | 28 namespace OrthancStone |
29 { | 29 { |
30 FloatTextureSceneLayer::FloatTextureSceneLayer(const Orthanc::ImageAccessor& texture) | 30 FloatTextureSceneLayer::FloatTextureSceneLayer(const Orthanc::ImageAccessor& texture) : |
31 inverted_(false) | |
31 { | 32 { |
32 { | 33 { |
33 std::auto_ptr<Orthanc::ImageAccessor> t( | 34 std::auto_ptr<Orthanc::ImageAccessor> t( |
34 new Orthanc::Image(Orthanc::PixelFormat_Float32, | 35 new Orthanc::Image(Orthanc::PixelFormat_Float32, |
35 texture.GetWidth(), | 36 texture.GetWidth(), |
84 ::OrthancStone::ComputeWindowing(targetCenter, targetWidth, | 85 ::OrthancStone::ComputeWindowing(targetCenter, targetWidth, |
85 windowing_, customCenter_, customWidth_); | 86 windowing_, customCenter_, customWidth_); |
86 } | 87 } |
87 | 88 |
88 | 89 |
90 void FloatTextureSceneLayer::SetInverted(bool inverted) | |
91 { | |
92 inverted_ = inverted; | |
93 IncrementRevision(); | |
94 } | |
95 | |
96 | |
89 void FloatTextureSceneLayer::FitRange() | 97 void FloatTextureSceneLayer::FitRange() |
90 { | 98 { |
91 float minValue, maxValue; | 99 float minValue, maxValue; |
92 Orthanc::ImageProcessing::GetMinMaxFloatValue(minValue, maxValue, GetTexture()); | 100 Orthanc::ImageProcessing::GetMinMaxFloatValue(minValue, maxValue, GetTexture()); |
93 | 101 |
114 | 122 |
115 cloned->CopyParameters(*this); | 123 cloned->CopyParameters(*this); |
116 cloned->windowing_ = windowing_; | 124 cloned->windowing_ = windowing_; |
117 cloned->customCenter_ = customCenter_; | 125 cloned->customCenter_ = customCenter_; |
118 cloned->customWidth_ = customWidth_; | 126 cloned->customWidth_ = customWidth_; |
127 cloned->inverted_ = inverted_; | |
119 | 128 |
120 return cloned.release(); | 129 return cloned.release(); |
121 } | 130 } |
122 } | 131 } |