Mercurial > hg > orthanc-stone
comparison Framework/Oracle/GetOrthancWebViewerJpegCommand.cpp @ 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 | 257f2c9a02ac |
comparison
equal
deleted
inserted
replaced
1296:86400fa16091 | 1298:8a0a62189f46 |
---|---|
124 { | 124 { |
125 isSigned = info["IsSigned"].asBool(); | 125 isSigned = info["IsSigned"].asBool(); |
126 } | 126 } |
127 } | 127 } |
128 | 128 |
129 std::auto_ptr<Orthanc::ImageAccessor> reader; | 129 std::unique_ptr<Orthanc::ImageAccessor> reader; |
130 | 130 |
131 { | 131 { |
132 std::string jpeg; | 132 std::string jpeg; |
133 Orthanc::Toolbox::DecodeBase64(jpeg, info["PixelData"].asString()); | 133 Orthanc::Toolbox::DecodeBase64(jpeg, info["PixelData"].asString()); |
134 | 134 |
195 // This range cannot be represented with a uint16_t or an int16_t | 195 // This range cannot be represented with a uint16_t or an int16_t |
196 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); | 196 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); |
197 } | 197 } |
198 | 198 |
199 // Decode a grayscale JPEG 8bpp image coming from the Web viewer | 199 // Decode a grayscale JPEG 8bpp image coming from the Web viewer |
200 std::auto_ptr<Orthanc::ImageAccessor> image | 200 std::unique_ptr<Orthanc::ImageAccessor> image |
201 (new Orthanc::Image(expectedFormat_, reader->GetWidth(), reader->GetHeight(), false)); | 201 (new Orthanc::Image(expectedFormat_, reader->GetWidth(), reader->GetHeight(), false)); |
202 | 202 |
203 Orthanc::ImageProcessing::Convert(*image, *reader); | 203 Orthanc::ImageProcessing::Convert(*image, *reader); |
204 reader.reset(); | 204 reader.reset(); |
205 | 205 |