comparison Framework/Radiography/RadiographyMaskLayer.cpp @ 1259:69177b10e2b9

various fixes for RadiographyScene: support text layers outside the dicom layer, fix background in this case + extract dicom from rendered scene
author Alain Mazy <alain@mazy.be>
date Tue, 21 Jan 2020 16:52:37 +0100
parents ab958fd99b07
children 1c7ae79c426d
comparison
equal deleted inserted replaced
1258:9c20ae049669 1259:69177b10e2b9
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));