comparison Framework/Toolbox/OrthancSlicesLoader.cpp @ 77:f5f54ed8d307 wasm

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 May 2017 21:13:29 +0200
parents ffa6dded91bd
children 5945e81734a3
comparison
equal deleted inserted replaced
76:0aef120d7e1c 77:f5f54ed8d307
333 (*webCallback_, uri, Operation::DownloadInstanceGeometry(instanceId, frame)); 333 (*webCallback_, uri, Operation::DownloadInstanceGeometry(instanceId, frame));
334 } 334 }
335 } 335 }
336 336
337 337
338 bool OrthancSlicesLoader::IsGeometryReady() const
339 {
340 return state_ == State_GeometryReady;
341 }
342
343
338 size_t OrthancSlicesLoader::GetSliceCount() const 344 size_t OrthancSlicesLoader::GetSliceCount() const
339 { 345 {
340 if (state_ != State_GeometryReady) 346 if (state_ != State_GeometryReady)
341 { 347 {
342 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 348 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
352 { 358 {
353 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); 359 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
354 } 360 }
355 361
356 return slices_.GetSlice(index); 362 return slices_.GetSlice(index);
363 }
364
365
366 bool OrthancSlicesLoader::LookupSlice(size_t& index,
367 const SliceGeometry& plane) const
368 {
369 if (state_ != State_GeometryReady)
370 {
371 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
372 }
373
374 return slices_.LookupSlice(index, plane);
357 } 375 }
358 376
359 377
360 void OrthancSlicesLoader::ScheduleLoadSliceImage(size_t index) 378 void OrthancSlicesLoader::ScheduleLoadSliceImage(size_t index)
361 { 379 {