Mercurial > hg > orthanc-stone
comparison Framework/Oracle/GetOrthancWebViewerJpegCommand.cpp @ 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 | 7ec8fea061b9 |
children | 257f2c9a02ac |
comparison
equal
deleted
inserted
replaced
1297:6ab03e429f06 | 1299:c38c89684d83 |
---|---|
112 { | 112 { |
113 isSigned = info["IsSigned"].asBool(); | 113 isSigned = info["IsSigned"].asBool(); |
114 } | 114 } |
115 } | 115 } |
116 | 116 |
117 std::auto_ptr<Orthanc::ImageAccessor> reader; | 117 std::unique_ptr<Orthanc::ImageAccessor> reader; |
118 | 118 |
119 { | 119 { |
120 std::string jpeg; | 120 std::string jpeg; |
121 Orthanc::Toolbox::DecodeBase64(jpeg, info["PixelData"].asString()); | 121 Orthanc::Toolbox::DecodeBase64(jpeg, info["PixelData"].asString()); |
122 | 122 |
183 // This range cannot be represented with a uint16_t or an int16_t | 183 // This range cannot be represented with a uint16_t or an int16_t |
184 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); | 184 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); |
185 } | 185 } |
186 | 186 |
187 // Decode a grayscale JPEG 8bpp image coming from the Web viewer | 187 // Decode a grayscale JPEG 8bpp image coming from the Web viewer |
188 std::auto_ptr<Orthanc::ImageAccessor> image | 188 std::unique_ptr<Orthanc::ImageAccessor> image |
189 (new Orthanc::Image(expectedFormat_, reader->GetWidth(), reader->GetHeight(), false)); | 189 (new Orthanc::Image(expectedFormat_, reader->GetWidth(), reader->GetHeight(), false)); |
190 | 190 |
191 Orthanc::ImageProcessing::Convert(*image, *reader); | 191 Orthanc::ImageProcessing::Convert(*image, *reader); |
192 reader.reset(); | 192 reader.reset(); |
193 | 193 |