comparison Framework/Radiography/RadiographyMaskLayer.cpp @ 1279:7ec8fea061b9 broker

integration mainline->broker
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Feb 2020 15:20:08 +0100
parents 69177b10e2b9
children 1c7ae79c426d
comparison
equal deleted inserted replaced
1271:0ca50d275b9a 1279:7ec8fea061b9
80 ImageInterpolation interpolation, 80 ImageInterpolation interpolation,
81 float windowCenter, 81 float windowCenter,
82 float windowWidth, 82 float windowWidth,
83 bool applyWindowing) const 83 bool applyWindowing) const
84 { 84 {
85 if (dicomLayer_.GetWidth() == 0) // nothing to do if the DICOM layer is not displayed (or not loaded) 85 if (dicomLayer_.GetWidth() == 0 || dicomLayer_.GetSourceImage() == NULL) // nothing to do if the DICOM layer is not displayed (or not loaded)
86 return; 86 return;
87 87
88 if (invalidated_) 88 if (invalidated_)
89 { 89 {
90 mask_.reset(new Orthanc::Image(Orthanc::PixelFormat_Grayscale8, dicomLayer_.GetWidth(), dicomLayer_.GetHeight(), false)); 90 mask_.reset(new Orthanc::Image(Orthanc::PixelFormat_Grayscale8, dicomLayer_.GetWidth(), dicomLayer_.GetHeight(), false));