diff OrthancServer/ParsedDicomFile.cpp @ 791:381f90e2b69d

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 05 May 2014 22:44:34 +0200
parents 331eaf9d9d69
children 111a1738e11e
line wrap: on
line diff
--- a/OrthancServer/ParsedDicomFile.cpp	Mon May 05 18:55:10 2014 +0200
+++ b/OrthancServer/ParsedDicomFile.cpp	Mon May 05 22:44:34 2014 +0200
@@ -1035,4 +1035,22 @@
     Replace(DICOM_TAG_SOP_INSTANCE_UID, FromDcmtkBridge::GenerateUniqueIdentifier(ResourceType_Instance));
   }
 
+
+  ParsedDicomFile::ParsedDicomFile(const char* content,
+                                   size_t size)
+  {
+    Setup(content, size);
+  }
+
+  ParsedDicomFile::ParsedDicomFile(const std::string& content)
+  {
+    if (content.size() == 0)
+    {
+      Setup(NULL, 0);
+    }
+    else
+    {
+      Setup(&content[0], content.size());
+    }
+  }
 }