Mercurial > hg > orthanc-stone
comparison Framework/Deprecated/Toolbox/DicomFrameConverter.h @ 1298:8a0a62189f46
replacing std::auto_ptr by std::unique_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 02 Mar 2020 16:31:30 +0100 |
parents | 2d8ab34c8c91 |
children | 30deba7bc8e2 |
comparison
equal
deleted
inserted
replaced
1296:86400fa16091 | 1298:8a0a62189f46 |
---|---|
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include <Plugins/Samples/Common/IDicomDataset.h> | 24 #include <Plugins/Samples/Common/IDicomDataset.h> |
25 #include <Core/Compatibility.h> | |
25 #include <Core/DicomFormat/DicomMap.h> | 26 #include <Core/DicomFormat/DicomMap.h> |
26 #include <Core/Images/ImageAccessor.h> | 27 #include <Core/Images/ImageAccessor.h> |
27 | 28 |
28 #include <memory> | 29 #include <memory> |
29 | 30 |
61 | 62 |
62 ~DicomFrameConverter() | 63 ~DicomFrameConverter() |
63 { | 64 { |
64 // TODO: check whether this dtor is called or not | 65 // TODO: check whether this dtor is called or not |
65 // An MSVC warning explains that declaring an | 66 // An MSVC warning explains that declaring an |
66 // std::auto_ptr with a forward-declared type | 67 // std::unique_ptr with a forward-declared type |
67 // prevents its dtor from being called. Does not | 68 // prevents its dtor from being called. Does not |
68 // seem an issue here (only POD types inside), but | 69 // seem an issue here (only POD types inside), but |
69 // definitely something to keep an eye on. | 70 // definitely something to keep an eye on. |
70 (void)0; | 71 (void)0; |
71 } | 72 } |
155 double GetRescaleSlope() const | 156 double GetRescaleSlope() const |
156 { | 157 { |
157 return rescaleSlope_; | 158 return rescaleSlope_; |
158 } | 159 } |
159 | 160 |
160 void ConvertFrameInplace(std::auto_ptr<Orthanc::ImageAccessor>& source) const; | 161 void ConvertFrameInplace(std::unique_ptr<Orthanc::ImageAccessor>& source) const; |
161 | 162 |
162 Orthanc::ImageAccessor* ConvertFrame(const Orthanc::ImageAccessor& source) const; | 163 Orthanc::ImageAccessor* ConvertFrame(const Orthanc::ImageAccessor& source) const; |
163 | 164 |
164 void ApplyRescale(Orthanc::ImageAccessor& image, | 165 void ApplyRescale(Orthanc::ImageAccessor& image, |
165 bool useDouble) const; | 166 bool useDouble) const; |