# HG changeset patch # User Sebastien Jodogne # Date 1688999026 -7200 # Node ID 30fb01ce97a380919fa1d897e7c625b9d4619ed8 # Parent ca605878dc73e63fdb86fb159d89254ac8cc9eac# Parent a6e4834ac1414a7e0c086ef210c6b67bc5e8d13a integration mainline->iiif diff -r ca605878dc73 -r 30fb01ce97a3 Framework/Inputs/DicomPyramid.cpp --- 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()); } diff -r ca605878dc73 -r 30fb01ce97a3 Framework/Inputs/DicomPyramidInstance.cpp --- 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