comparison Framework/Scene2D/LookupTableTextureSceneLayer.cpp @ 1072:391fb6d6905d

OrthancMultiframeVolumeLoader asks volume image to compute range + added IsContextLost to wasm viewport + added "computeRange" bool property to DicomVolumeImage + added ability to ask the MPR slicer for its source volume (to retrieve voxel value range)
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 16 Oct 2019 15:43:21 +0200
parents 11fc84650e4b
children 287ec78f63b4
comparison
equal deleted inserted replaced
1071:6dd90b8d1589 1072:391fb6d6905d
50 50
51 Orthanc::ImageProcessing::Convert(*t, texture); 51 Orthanc::ImageProcessing::Convert(*t, texture);
52 SetTexture(t.release()); 52 SetTexture(t.release());
53 } 53 }
54 54
55 SetLookupTableGrayscale(); 55 SetLookupTableGrayscale(); // simple ramp between 0 and 255
56 SetRange(0, 1); 56 SetRange(0, 1);
57 } 57 }
58 58
59 59
60 void LookupTableTextureSceneLayer::SetLookupTableGrayscale() 60 void LookupTableTextureSceneLayer::SetLookupTableGrayscale()
156 156
157 void LookupTableTextureSceneLayer::FitRange() 157 void LookupTableTextureSceneLayer::FitRange()
158 { 158 {
159 Orthanc::ImageProcessing::GetMinMaxFloatValue(minValue_, maxValue_, GetTexture()); 159 Orthanc::ImageProcessing::GetMinMaxFloatValue(minValue_, maxValue_, GetTexture());
160 assert(minValue_ <= maxValue_); 160 assert(minValue_ <= maxValue_);
161 161 // TODO: debug to be removed
162 LOG(ERROR) << "LookupTableTextureSceneLayer::FitRange(): minValue_ = " << minValue_ << " maxValue_ = " << maxValue_;
162 IncrementRevision(); 163 IncrementRevision();
163 } 164 }
164 165
165 166
166 ISceneLayer* LookupTableTextureSceneLayer::Clone() const 167 ISceneLayer* LookupTableTextureSceneLayer::Clone() const
167 { 168 {
168 std::auto_ptr<LookupTableTextureSceneLayer> cloned 169 std::auto_ptr<LookupTableTextureSceneLayer> cloned
169 (new LookupTableTextureSceneLayer(GetTexture())); 170 (new LookupTableTextureSceneLayer(GetTexture()));
170 171
172
173 // TODO: why is windowing_ not copied??????
171 cloned->CopyParameters(*this); 174 cloned->CopyParameters(*this);
172 cloned->minValue_ = minValue_; 175 cloned->minValue_ = minValue_;
173 cloned->maxValue_ = maxValue_; 176 cloned->maxValue_ = maxValue_;
174 cloned->lut_ = lut_; 177 cloned->lut_ = lut_;
175 178