Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/LookupTableStyleConfigurator.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 |
---|---|
37 bool hasLut_; | 37 bool hasLut_; |
38 std::vector<uint8_t> lut_; | 38 std::vector<uint8_t> lut_; |
39 bool hasRange_; | 39 bool hasRange_; |
40 float minValue_; | 40 float minValue_; |
41 float maxValue_; | 41 float maxValue_; |
42 bool applyLog_; | |
42 | 43 |
43 public: | 44 public: |
44 LookupTableStyleConfigurator(); | 45 LookupTableStyleConfigurator(); |
45 | 46 |
46 void SetLookupTable(Orthanc::EmbeddedResources::FileResourceId resource); | 47 void SetLookupTable(Orthanc::EmbeddedResources::FileResourceId resource); |
53 */ | 54 */ |
54 void SetLookupTable(const std::vector<uint8_t>& lut); | 55 void SetLookupTable(const std::vector<uint8_t>& lut); |
55 | 56 |
56 void SetRange(float minValue, float maxValue); | 57 void SetRange(float minValue, float maxValue); |
57 | 58 |
59 void SetApplyLog(bool apply); | |
60 | |
61 bool IsApplyLog() const | |
62 { | |
63 return applyLog_; | |
64 } | |
65 | |
58 virtual uint64_t GetRevision() const | 66 virtual uint64_t GetRevision() const |
59 { | 67 { |
60 return revision_; | 68 return revision_; |
61 } | 69 } |
62 | 70 |
63 virtual TextureBaseSceneLayer* CreateTextureFromImage(const Orthanc::ImageAccessor& image) const; | 71 virtual TextureBaseSceneLayer* CreateTextureFromImage(const Orthanc::ImageAccessor& image) const; |
64 | 72 |
65 virtual TextureBaseSceneLayer* CreateTextureFromDicom(const Orthanc::ImageAccessor& frame, | 73 virtual TextureBaseSceneLayer* CreateTextureFromDicom(const Orthanc::ImageAccessor& frame, |
66 const DicomInstanceParameters& parameters) const | 74 const DicomInstanceParameters& parameters) const |
67 { | 75 { |
68 return parameters.CreateLookupTableTexture(frame); | 76 return parameters.CreateLookupTableTexture(frame); |
69 } | 77 } |
70 | 78 |
71 virtual void ApplyStyle(ISceneLayer& layer) const; | 79 virtual void ApplyStyle(ISceneLayer& layer) const; |