changeset 269:30fb01ce97a3 iiif

integration mainline->iiif
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 10 Jul 2023 16:23:46 +0200
parents ca605878dc73 (current diff) a6e4834ac141 (diff)
children 0040ce361d4c
files Framework/Inputs/DicomPyramidInstance.cpp
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Inputs/DicomPyramid.cpp	Mon Jul 10 15:46:19 2023 +0200
+++ b/Framework/Inputs/DicomPyramid.cpp	Mon Jul 10 16:23:46 2023 +0200
@@ -99,8 +99,8 @@
 
         // Don't consider the thumbnail and overview as part of the DICOM pyramid (new in 1.0)
         if (tokens.size() < 2 ||
-            (tokens[2] != "THUMBNAIL" &&
-             tokens[2] != "OVERVIEW"))
+            (tokens[1] != "THUMBNAIL" &&
+             tokens[1] != "OVERVIEW"))
         {
           instances_.push_back(instance.release());
         }        
--- a/Framework/Inputs/DicomPyramidInstance.cpp	Mon Jul 10 15:46:19 2023 +0200
+++ b/Framework/Inputs/DicomPyramidInstance.cpp	Mon Jul 10 16:23:46 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