comparison Framework/Scene2D/LookupTableTextureSceneLayer.h @ 1179:177e7d431cd1 broker

log scale in textures, remove redundant code for LUTs
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Nov 2019 15:24:20 +0100
parents 287ec78f63b4
children 0ca50d275b9a
comparison
equal deleted inserted replaced
1178:3c7cdbf32e2a 1179:177e7d431cd1
30 private: 30 private:
31 ImageWindowing windowing_; 31 ImageWindowing windowing_;
32 float minValue_; 32 float minValue_;
33 float maxValue_; 33 float maxValue_;
34 std::vector<uint8_t> lut_; 34 std::vector<uint8_t> lut_;
35 bool applyLog_;
35 36
36 void SetLookupTableRgb(const std::vector<uint8_t>& lut); 37 void SetLookupTableRgb(const std::vector<uint8_t>& lut);
37 38
38 public: 39 public:
39 // The pixel format must be convertible to Float32 40 // The pixel format must be convertible to Float32
64 const std::vector<uint8_t>& GetLookupTable() const 65 const std::vector<uint8_t>& GetLookupTable() const
65 { 66 {
66 return lut_; 67 return lut_;
67 } 68 }
68 69
70 void SetApplyLog(bool apply);
71
72 bool IsApplyLog() const
73 {
74 return applyLog_;
75 }
76
69 virtual ISceneLayer* Clone() const; 77 virtual ISceneLayer* Clone() const;
70 78
71 virtual Type GetType() const 79 virtual Type GetType() const
72 { 80 {
73 return Type_LookupTableTexture; 81 return Type_LookupTableTexture;
74 } 82 }
83
84 // Render the texture to a color image of format BGRA32 (Cairo
85 // surfaces) or RGBA32 (OpenGL)
86 void Render(Orthanc::ImageAccessor& target) const;
75 }; 87 };
76 } 88 }