diff Core/DicomParsing/ParsedDicomFile.cpp @ 3745:113a7b994a12

extracting the raw frame in the transcoder
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Mar 2020 21:48:35 +0100
parents 2a170a8f1faf
children ba53d51ffa9a
line wrap: on
line diff
--- a/Core/DicomParsing/ParsedDicomFile.cpp	Thu Mar 12 17:58:34 2020 +0100
+++ b/Core/DicomParsing/ParsedDicomFile.cpp	Thu Mar 12 21:48:35 2020 +0100
@@ -1557,7 +1557,9 @@
   {
     if (pimpl_->frameIndex_.get() == NULL)
     {
-      pimpl_->frameIndex_.reset(new DicomFrameIndex(*pimpl_->file_));
+      assert(pimpl_->file_ != NULL &&
+             pimpl_->file_->getDataset() != NULL);
+      pimpl_->frameIndex_.reset(new DicomFrameIndex(*pimpl_->file_->getDataset()));
     }
 
     pimpl_->frameIndex_->GetRawFrame(target, frameId);
@@ -1589,7 +1591,9 @@
 
   unsigned int ParsedDicomFile::GetFramesCount() const
   {
-    return DicomFrameIndex::GetFramesCount(*pimpl_->file_);
+    assert(pimpl_->file_ != NULL &&
+           pimpl_->file_->getDataset() != NULL);
+    return DicomFrameIndex::GetFramesCount(*pimpl_->file_->getDataset());
   }