changeset 268:a6e4834ac141

added some tolerance in the PerFrameFunctionalGroupsSequence tag
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 10 Jul 2023 16:22:14 +0200
parents fb689ed55c09
children 30fb01ce97a3 169f168ba07a
files Framework/Inputs/DicomPyramidInstance.cpp
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Inputs/DicomPyramidInstance.cpp	Mon Jul 10 16:14:42 2023 +0200
+++ b/Framework/Inputs/DicomPyramidInstance.cpp	Mon Jul 10 16:22:14 2023 +0200
@@ -190,7 +190,7 @@
         throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
       }
 
-      frames_.resize(countFrames);
+      frames_.reserve(countFrames);
 
       for (size_t i = 0; i < countFrames; i++)
       {
@@ -225,11 +225,11 @@
         {
           LOG(ERROR) << "Frame " << i << " with unexpected tile location (" 
                      << x << "," << y << ") in instance: " << instanceId;
-          throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
         }
-
-        frames_[i].first = x / tileWidth_;
-        frames_[i].second = y / tileHeight_;
+        else
+        {
+          frames_.push_back(std::make_pair(x / tileWidth_, y / tileHeight_));
+        }
       }
     }
     else