comparison Framework/Toolbox/DicomInstanceParameters.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 8e497a4e3d96
comparison
equal deleted inserted replaced
953:118fc5c85d07 956:a7351ad54960
274 { 274 {
275 return data_.rescaleIntercept_; 275 return data_.rescaleIntercept_;
276 } 276 }
277 else 277 else
278 { 278 {
279 LOG(ERROR) << "DicomInstanceParameters::GetRescaleIntercept(): !data_.hasRescale_";
279 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 280 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
280 } 281 }
281 } 282 }
282 283
283 284
287 { 288 {
288 return data_.rescaleSlope_; 289 return data_.rescaleSlope_;
289 } 290 }
290 else 291 else
291 { 292 {
293 LOG(ERROR) << "DicomInstanceParameters::GetRescaleSlope(): !data_.hasRescale_";
292 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 294 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
293 } 295 }
294 } 296 }
295 297
296 298
300 { 302 {
301 return data_.defaultWindowingCenter_; 303 return data_.defaultWindowingCenter_;
302 } 304 }
303 else 305 else
304 { 306 {
307 LOG(ERROR) << "DicomInstanceParameters::GetDefaultWindowingCenter(): !data_.hasRescale_";
305 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 308 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
306 } 309 }
307 } 310 }
308 311
309 312
313 { 316 {
314 return data_.defaultWindowingWidth_; 317 return data_.defaultWindowingWidth_;
315 } 318 }
316 else 319 else
317 { 320 {
321 LOG(ERROR) << "DicomInstanceParameters::GetDefaultWindowingWidth(): !data_.hasRescale_";
318 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 322 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
319 } 323 }
320 } 324 }
321 325
322 326