comparison Core/DicomParsing/Internals/DicomImageDecoder.h @ 3712:2a170a8f1faf

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 15:32:45 +0100
parents 94f4a18a79cc
children accf1b60b108
comparison
equal deleted inserted replaced
3709:1f4910999fe7 3712:2a170a8f1faf
31 **/ 31 **/
32 32
33 33
34 #pragma once 34 #pragma once
35 35
36 #include "../../Compatibility.h"
36 #include "../ParsedDicomFile.h" 37 #include "../ParsedDicomFile.h"
37 38
38 #include <memory> 39 #include <memory>
39 40
40 #if !defined(ORTHANC_ENABLE_JPEG) 41 #if !defined(ORTHANC_ENABLE_JPEG)
80 const DcmCodecParameter& parameters, 81 const DcmCodecParameter& parameters,
81 const DcmRepresentationParameter& representationParameter, 82 const DcmRepresentationParameter& representationParameter,
82 DcmDataset& dataset, 83 DcmDataset& dataset,
83 unsigned int frame); 84 unsigned int frame);
84 85
85 static bool TruncateDecodedImage(std::auto_ptr<ImageAccessor>& image, 86 static bool TruncateDecodedImage(std::unique_ptr<ImageAccessor>& image,
86 PixelFormat format, 87 PixelFormat format,
87 bool allowColorConversion); 88 bool allowColorConversion);
88 89
89 static bool PreviewDecodedImage(std::auto_ptr<ImageAccessor>& image); 90 static bool PreviewDecodedImage(std::unique_ptr<ImageAccessor>& image);
90 91
91 static void ApplyExtractionMode(std::auto_ptr<ImageAccessor>& image, 92 static void ApplyExtractionMode(std::unique_ptr<ImageAccessor>& image,
92 ImageExtractionMode mode, 93 ImageExtractionMode mode,
93 bool invert); 94 bool invert);
94 95
95 public: 96 public:
96 static bool IsPsmctRle1(DcmDataset& dataset); 97 static bool IsPsmctRle1(DcmDataset& dataset);
100 101
101 static ImageAccessor *Decode(ParsedDicomFile& dicom, 102 static ImageAccessor *Decode(ParsedDicomFile& dicom,
102 unsigned int frame); 103 unsigned int frame);
103 104
104 static void ExtractPamImage(std::string& result, 105 static void ExtractPamImage(std::string& result,
105 std::auto_ptr<ImageAccessor>& image, 106 std::unique_ptr<ImageAccessor>& image,
106 ImageExtractionMode mode, 107 ImageExtractionMode mode,
107 bool invert); 108 bool invert);
108 109
109 #if ORTHANC_ENABLE_PNG == 1 110 #if ORTHANC_ENABLE_PNG == 1
110 static void ExtractPngImage(std::string& result, 111 static void ExtractPngImage(std::string& result,
111 std::auto_ptr<ImageAccessor>& image, 112 std::unique_ptr<ImageAccessor>& image,
112 ImageExtractionMode mode, 113 ImageExtractionMode mode,
113 bool invert); 114 bool invert);
114 #endif 115 #endif
115 116
116 #if ORTHANC_ENABLE_JPEG == 1 117 #if ORTHANC_ENABLE_JPEG == 1
117 static void ExtractJpegImage(std::string& result, 118 static void ExtractJpegImage(std::string& result,
118 std::auto_ptr<ImageAccessor>& image, 119 std::unique_ptr<ImageAccessor>& image,
119 ImageExtractionMode mode, 120 ImageExtractionMode mode,
120 bool invert, 121 bool invert,
121 uint8_t quality); 122 uint8_t quality);
122 #endif 123 #endif
123 }; 124 };