diff Core/DicomParsing/ParsedDicomFile.h @ 3912:7610af1532c3 transcoding

prototyping automated transcoding of incoming DICOM files
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 May 2020 13:43:50 +0200
parents 4922bdd046dd
children aae045f802f4
line wrap: on
line diff
--- a/Core/DicomParsing/ParsedDicomFile.h	Fri May 08 12:10:04 2020 +0200
+++ b/Core/DicomParsing/ParsedDicomFile.h	Fri May 08 13:43:50 2020 +0200
@@ -102,6 +102,8 @@
 
     bool EmbedContentInternal(const std::string& dataUriScheme);
 
+    ParsedDicomFile(DcmFileFormat* dicom);  // This takes ownership (no clone)
+
   public:
     ParsedDicomFile(bool createIdentifiers);  // Create a minimal DICOM instance
 
@@ -114,9 +116,14 @@
 
     ParsedDicomFile(const std::string& content);
 
-    ParsedDicomFile(DcmDataset& dicom);
+    ParsedDicomFile(DcmDataset& dicom);  // This clones the DCMTK object
+
+    ParsedDicomFile(DcmFileFormat& dicom);  // This clones the DCMTK object
 
-    ParsedDicomFile(DcmFileFormat& dicom);
+    static ParsedDicomFile* AcquireDcmtkObject(DcmFileFormat* dicom)  // No clone here
+    {
+      return new ParsedDicomFile(dicom);
+    }
 
     DcmFileFormat& GetDcmtkObject() const;