Mercurial > hg > orthanc-stone
comparison Framework/Radiography/RadiographyScene.cpp @ 475:3c28542229a3 am-touch-events
added a mask layer in the RadiographyWidget (to be cleaned)
author | am@osimis.io |
---|---|
date | Tue, 12 Feb 2019 12:22:13 +0100 |
parents | a750f11892ec |
children | 159a465e27bd |
comparison
equal
deleted
inserted
replaced
467:22b80f5c3a1c | 475:3c28542229a3 |
---|---|
22 #include "RadiographyScene.h" | 22 #include "RadiographyScene.h" |
23 | 23 |
24 #include "RadiographyAlphaLayer.h" | 24 #include "RadiographyAlphaLayer.h" |
25 #include "RadiographyDicomLayer.h" | 25 #include "RadiographyDicomLayer.h" |
26 #include "RadiographyTextLayer.h" | 26 #include "RadiographyTextLayer.h" |
27 #include "RadiographyMaskLayer.h" | |
27 #include "../Toolbox/DicomFrameConverter.h" | 28 #include "../Toolbox/DicomFrameConverter.h" |
28 | 29 |
29 #include <Core/Images/Image.h> | 30 #include <Core/Images/Image.h> |
30 #include <Core/Images/ImageProcessing.h> | 31 #include <Core/Images/ImageProcessing.h> |
31 #include <Core/Images/PamReader.h> | 32 #include <Core/Images/PamReader.h> |
289 Orthanc::ImageProcessing::Set(region, color); | 290 Orthanc::ImageProcessing::Set(region, color); |
290 } | 291 } |
291 | 292 |
292 return LoadAlphaBitmap(block.release(), geometry); | 293 return LoadAlphaBitmap(block.release(), geometry); |
293 } | 294 } |
295 | |
296 RadiographyLayer& RadiographyScene::LoadMask(const std::vector<MaskPoint>& corners, | |
297 const RadiographyDicomLayer& dicomLayer, | |
298 float foreground, | |
299 RadiographyLayer::Geometry* geometry) | |
300 { | |
301 std::auto_ptr<RadiographyMaskLayer> mask(new RadiographyMaskLayer(*this, dicomLayer, foreground)); | |
302 mask->SetCorners(corners); | |
303 if (geometry != NULL) | |
304 { | |
305 mask->SetGeometry(*geometry); | |
306 } | |
307 | |
308 return RegisterLayer(mask.release()); | |
309 } | |
310 | |
294 | 311 |
295 RadiographyLayer& RadiographyScene::LoadAlphaBitmap(Orthanc::ImageAccessor* bitmap, RadiographyLayer::Geometry *geometry) | 312 RadiographyLayer& RadiographyScene::LoadAlphaBitmap(Orthanc::ImageAccessor* bitmap, RadiographyLayer::Geometry *geometry) |
296 { | 313 { |
297 std::auto_ptr<RadiographyAlphaLayer> alpha(new RadiographyAlphaLayer(*this)); | 314 std::auto_ptr<RadiographyAlphaLayer> alpha(new RadiographyAlphaLayer(*this)); |
298 alpha->SetAlpha(bitmap); | 315 alpha->SetAlpha(bitmap); |