diff 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
line wrap: on
line diff
--- a/Core/DicomParsing/Internals/DicomImageDecoder.h	Fri Feb 28 13:23:11 2020 +0100
+++ b/Core/DicomParsing/Internals/DicomImageDecoder.h	Mon Mar 02 15:32:45 2020 +0100
@@ -33,6 +33,7 @@
 
 #pragma once
 
+#include "../../Compatibility.h"
 #include "../ParsedDicomFile.h"
 
 #include <memory>
@@ -82,13 +83,13 @@
                                      DcmDataset& dataset,
                                      unsigned int frame);
 
-    static bool TruncateDecodedImage(std::auto_ptr<ImageAccessor>& image,
+    static bool TruncateDecodedImage(std::unique_ptr<ImageAccessor>& image,
                                      PixelFormat format,
                                      bool allowColorConversion);
 
-    static bool PreviewDecodedImage(std::auto_ptr<ImageAccessor>& image);
+    static bool PreviewDecodedImage(std::unique_ptr<ImageAccessor>& image);
 
-    static void ApplyExtractionMode(std::auto_ptr<ImageAccessor>& image,
+    static void ApplyExtractionMode(std::unique_ptr<ImageAccessor>& image,
                                     ImageExtractionMode mode,
                                     bool invert);
 
@@ -102,20 +103,20 @@
                                  unsigned int frame);
 
     static void ExtractPamImage(std::string& result,
-                                std::auto_ptr<ImageAccessor>& image,
+                                std::unique_ptr<ImageAccessor>& image,
                                 ImageExtractionMode mode,
                                 bool invert);
 
 #if ORTHANC_ENABLE_PNG == 1
     static void ExtractPngImage(std::string& result,
-                                std::auto_ptr<ImageAccessor>& image,
+                                std::unique_ptr<ImageAccessor>& image,
                                 ImageExtractionMode mode,
                                 bool invert);
 #endif
 
 #if ORTHANC_ENABLE_JPEG == 1
     static void ExtractJpegImage(std::string& result,
-                                 std::auto_ptr<ImageAccessor>& image,
+                                 std::unique_ptr<ImageAccessor>& image,
                                  ImageExtractionMode mode,
                                  bool invert,
                                  uint8_t quality);