Mercurial > hg > orthanc-stone
comparison Framework/Radiography/RadiographyScene.cpp @ 425:087237703d63 am-vsol-upgrade
added layer accessors
author | am@osimis.io |
---|---|
date | Thu, 22 Nov 2018 11:45:18 +0100 |
parents | c23df8b3433b |
children | 660fe6f6bf4a |
comparison
equal
deleted
inserted
replaced
424:bb573a52fc63 | 425:087237703d63 |
---|---|
441 assert(it->second != NULL); | 441 assert(it->second != NULL); |
442 delete it->second; | 442 delete it->second; |
443 } | 443 } |
444 } | 444 } |
445 | 445 |
446 void RadiographyScene::RemoveLayer(size_t layerIndex) | |
447 { | |
448 if (layerIndex > countLayers_) | |
449 { | |
450 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | |
451 } | |
452 delete layers_[layerIndex]; | |
453 layers_.erase(layerIndex); | |
454 countLayers_--; | |
455 } | |
456 | |
457 RadiographyLayer& RadiographyScene::GetLayer(size_t layerIndex) | |
458 { | |
459 if (layerIndex > countLayers_) | |
460 { | |
461 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); | |
462 } | |
463 return *(layers_[layerIndex]); | |
464 } | |
446 | 465 |
447 bool RadiographyScene::GetWindowing(float& center, | 466 bool RadiographyScene::GetWindowing(float& center, |
448 float& width) const | 467 float& width) const |
449 { | 468 { |
450 if (hasWindowing_) | 469 if (hasWindowing_) |