Mercurial > hg > orthanc
diff Plugins/Engine/OrthancPlugins.cpp @ 1669:a412ad57f0f9 db-changes
refactoring of sample plugins, OrthancPluginReconstructMainDicomTags
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 01 Oct 2015 11:55:25 +0200 |
parents | de1413733c97 |
children | 0bbcfd9695e5 |
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp Wed Sep 30 17:18:39 2015 +0200 +++ b/Plugins/Engine/OrthancPlugins.cpp Thu Oct 01 11:55:25 2015 +0200 @@ -1709,6 +1709,22 @@ return true; } + case _OrthancPluginService_ReconstructMainDicomTags: + { + const _OrthancPluginReconstructMainDicomTags& p = + *reinterpret_cast<const _OrthancPluginReconstructMainDicomTags*>(parameters); + + if (pimpl_->database_.get() == NULL) + { + LOG(ERROR) << "The service ReconstructMainDicomTags can only be invoked by custom database plugins"; + throw OrthancException(ErrorCode_DatabasePlugin); + } + + IStorageArea& storage = *reinterpret_cast<IStorageArea*>(p.storageArea); + Toolbox::ReconstructMainDicomTags(*pimpl_->database_, storage, Plugins::Convert(p.level)); + return true; + } + default: { // This service is unknown to the Orthanc plugin engine