diff OrthancServer/ParsedDicomFile.cpp @ 1788:6a2d507ef064 worklists

getting rid of opaque data structures
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Nov 2015 16:11:28 +0100
parents 1b1d5470233f
children 30e97a1f4093
line wrap: on
line diff
--- a/OrthancServer/ParsedDicomFile.cpp	Wed Nov 18 15:50:32 2015 +0100
+++ b/OrthancServer/ParsedDicomFile.cpp	Wed Nov 18 16:11:28 2015 +0100
@@ -863,15 +863,27 @@
   }
 
 
+  ParsedDicomFile::ParsedDicomFile(DcmDataset& dicom) : pimpl_(new PImpl)
+  {
+    pimpl_->file_.reset(new DcmFileFormat(&dicom));
+  }
+
+
+  ParsedDicomFile::ParsedDicomFile(DcmFileFormat& dicom) : pimpl_(new PImpl)
+  {
+    pimpl_->file_.reset(new DcmFileFormat(dicom));
+  }
+
+
   ParsedDicomFile::~ParsedDicomFile()
   {
     delete pimpl_;
   }
 
 
-  void* ParsedDicomFile::GetDcmtkObject()
+  DcmFileFormat& ParsedDicomFile::GetDcmtkObject()
   {
-    return pimpl_->file_.get();
+    return *pimpl_->file_.get();
   }