comparison Framework/Radiography/RadiographyAlphaLayer.h @ 1299:c38c89684d83 broker

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 17:21:24 +0100
parents 68579a31eeb4
children 257f2c9a02ac
comparison
equal deleted inserted replaced
1297:6ab03e429f06 1299:c38c89684d83
21 21
22 #pragma once 22 #pragma once
23 23
24 #include "RadiographyLayer.h" 24 #include "RadiographyLayer.h"
25 25
26 #include <Core/Compatibility.h>
27
26 namespace OrthancStone 28 namespace OrthancStone
27 { 29 {
28 class RadiographyScene; 30 class RadiographyScene;
29 31
30 // creates a transparent layer whose alpha channel is provided as a UINT8 image to SetAlpha. 32 // creates a transparent layer whose alpha channel is provided as a UINT8 image to SetAlpha.
31 // The color of the "mask" is either defined by a ForegroundValue or by the center value of the 33 // The color of the "mask" is either defined by a ForegroundValue or by the center value of the
32 // windowing from the scene. 34 // windowing from the scene.
33 class RadiographyAlphaLayer : public RadiographyLayer 35 class RadiographyAlphaLayer : public RadiographyLayer
34 { 36 {
35 private: 37 private:
36 std::auto_ptr<Orthanc::ImageAccessor> alpha_; // Grayscale8 in the range [0, 255] 0 = transparent, 255 = opaque -> the foreground value will be displayed 38 std::unique_ptr<Orthanc::ImageAccessor> alpha_; // Grayscale8 in the range [0, 255] 0 = transparent, 255 = opaque -> the foreground value will be displayed
37 float foreground_; // in the range [0.0, 65535.0] 39 float foreground_; // in the range [0.0, 65535.0]
38 40
39 public: 41 public:
40 RadiographyAlphaLayer(const RadiographyScene& scene) : 42 RadiographyAlphaLayer(const RadiographyScene& scene) :
41 RadiographyLayer(scene), 43 RadiographyLayer(scene),