diff Core/DicomParsing/ParsedDicomFile.cpp @ 3881:f23ab7829a8d transcoding

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 05 May 2020 10:35:39 +0200
parents ba53d51ffa9a
children 795c9ca5eb91
line wrap: on
line diff
--- a/Core/DicomParsing/ParsedDicomFile.cpp	Mon May 04 22:10:55 2020 +0200
+++ b/Core/DicomParsing/ParsedDicomFile.cpp	Tue May 05 10:35:39 2020 +0200
@@ -1625,7 +1625,22 @@
 
   bool ParsedDicomFile::LookupTransferSyntax(std::string& result)
   {
-    return FromDcmtkBridge::LookupTransferSyntax(result, *pimpl_->file_);
+    // TODO - Shouldn't "dataset.getOriginalXfer()" be used instead of
+    // using the meta header?
+    const char* value = NULL;
+
+    assert(pimpl_->file_ != NULL);
+    if (pimpl_->file_->getMetaInfo() != NULL &&
+        pimpl_->file_->getMetaInfo()->findAndGetString(DCM_TransferSyntaxUID, value).good() &&
+        value != NULL)
+    {
+      result.assign(value);
+      return true;
+    }
+    else
+    {
+      return false;
+    }
   }