Mercurial > hg > orthanc-stone
changeset 425:087237703d63 am-vsol-upgrade
added layer accessors
author | am@osimis.io |
---|---|
date | Thu, 22 Nov 2018 11:45:18 +0100 |
parents | bb573a52fc63 |
children | 660fe6f6bf4a |
files | Framework/Radiography/RadiographyScene.cpp Framework/Radiography/RadiographyScene.h |
diffstat | 2 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Radiography/RadiographyScene.cpp Wed Nov 21 17:08:03 2018 +0100 +++ b/Framework/Radiography/RadiographyScene.cpp Thu Nov 22 11:45:18 2018 +0100 @@ -443,6 +443,25 @@ } } + void RadiographyScene::RemoveLayer(size_t layerIndex) + { + if (layerIndex > countLayers_) + { + throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); + } + delete layers_[layerIndex]; + layers_.erase(layerIndex); + countLayers_--; + } + + RadiographyLayer& RadiographyScene::GetLayer(size_t layerIndex) + { + if (layerIndex > countLayers_) + { + throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); + } + return *(layers_[layerIndex]); + } bool RadiographyScene::GetWindowing(float& center, float& width) const
--- a/Framework/Radiography/RadiographyScene.h Wed Nov 21 17:08:03 2018 +0100 +++ b/Framework/Radiography/RadiographyScene.h Thu Nov 22 11:45:18 2018 +0100 @@ -117,6 +117,15 @@ RadiographyLayer& LoadDicomWebFrame(IWebService& web); + void RemoveLayer(size_t layerIndex); + + size_t GetLayerCount() + { + return countLayers_; + } + + RadiographyLayer& GetLayer(size_t layerIndex); + Extent2D GetSceneExtent() const; void Render(Orthanc::ImageAccessor& buffer,