Mercurial > hg > orthanc-stone
comparison Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp @ 956:a7351ad54960
Made IsContextLost automatically set the flag by checking with the emscripten
WebGL wrapper + added a LOT of logging messages right before throwing
ErrorCode_BadSequenceOfCalls exceptions + increased the http request timeouts
from 60 to 600 sec (big datasets in some recent customer use cases) + added
IsContext lost through the Viewport/Context layer (to make it reachable from
external API) + the same for the underlying device context (for debug)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 21 Aug 2019 16:16:30 +0200 |
parents | 32eaf4929b08 |
children | 262a0244e9b2 |
comparison
equal
deleted
inserted
replaced
953:118fc5c85d07 | 956:a7351ad54960 |
---|---|
138 | 138 |
139 void OrthancSeriesVolumeProgressiveLoader::SeriesGeometry::CheckSliceIndex(size_t index) const | 139 void OrthancSeriesVolumeProgressiveLoader::SeriesGeometry::CheckSliceIndex(size_t index) const |
140 { | 140 { |
141 if (!HasGeometry()) | 141 if (!HasGeometry()) |
142 { | 142 { |
143 LOG(ERROR) << "OrthancSeriesVolumeProgressiveLoader::SeriesGeometry::CheckSliceIndex(size_t index): (!HasGeometry())"; | |
143 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 144 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
144 } | 145 } |
145 else if (index >= slices_.size()) | 146 else if (index >= slices_.size()) |
146 { | 147 { |
147 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | 148 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); |
202 | 203 |
203 const VolumeImageGeometry& OrthancSeriesVolumeProgressiveLoader::SeriesGeometry::GetImageGeometry() const | 204 const VolumeImageGeometry& OrthancSeriesVolumeProgressiveLoader::SeriesGeometry::GetImageGeometry() const |
204 { | 205 { |
205 if (!HasGeometry()) | 206 if (!HasGeometry()) |
206 { | 207 { |
208 LOG(ERROR) << "OrthancSeriesVolumeProgressiveLoader::SeriesGeometry::GetImageGeometry(): (!HasGeometry())"; | |
207 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 209 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
208 } | 210 } |
209 else | 211 else |
210 { | 212 { |
211 assert(slices_.size() == geometry_->GetDepth()); | 213 assert(slices_.size() == geometry_->GetDepth()); |
448 | 450 |
449 void OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(unsigned int count) | 451 void OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(unsigned int count) |
450 { | 452 { |
451 if (active_) | 453 if (active_) |
452 { | 454 { |
455 LOG(ERROR) << "OrthancSeriesVolumeProgressiveLoader::SetSimultaneousDownloads(): (active_)"; | |
453 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 456 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
454 } | 457 } |
455 else if (count == 0) | 458 else if (count == 0) |
456 { | 459 { |
457 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | 460 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); |
467 { | 470 { |
468 // LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::LoadSeries seriesId=" << seriesId; | 471 // LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::LoadSeries seriesId=" << seriesId; |
469 if (active_) | 472 if (active_) |
470 { | 473 { |
471 // LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::LoadSeries NOT ACTIVE! --> ERROR"; | 474 // LOG(TRACE) << "OrthancSeriesVolumeProgressiveLoader::LoadSeries NOT ACTIVE! --> ERROR"; |
475 LOG(ERROR) << "OrthancSeriesVolumeProgressiveLoader::LoadSeries(const std::string& seriesId): (active_)"; | |
472 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 476 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
473 } | 477 } |
474 else | 478 else |
475 { | 479 { |
476 active_ = true; | 480 active_ = true; |