comparison 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
comparison
equal deleted inserted replaced
1668:de1413733c97 1669:a412ad57f0f9
1707 Plugins::Convert(p.vr), p.name, 1707 Plugins::Convert(p.vr), p.name,
1708 p.minMultiplicity, p.maxMultiplicity); 1708 p.minMultiplicity, p.maxMultiplicity);
1709 return true; 1709 return true;
1710 } 1710 }
1711 1711
1712 case _OrthancPluginService_ReconstructMainDicomTags:
1713 {
1714 const _OrthancPluginReconstructMainDicomTags& p =
1715 *reinterpret_cast<const _OrthancPluginReconstructMainDicomTags*>(parameters);
1716
1717 if (pimpl_->database_.get() == NULL)
1718 {
1719 LOG(ERROR) << "The service ReconstructMainDicomTags can only be invoked by custom database plugins";
1720 throw OrthancException(ErrorCode_DatabasePlugin);
1721 }
1722
1723 IStorageArea& storage = *reinterpret_cast<IStorageArea*>(p.storageArea);
1724 Toolbox::ReconstructMainDicomTags(*pimpl_->database_, storage, Plugins::Convert(p.level));
1725 return true;
1726 }
1727
1712 default: 1728 default:
1713 { 1729 {
1714 // This service is unknown to the Orthanc plugin engine 1730 // This service is unknown to the Orthanc plugin engine
1715 return false; 1731 return false;
1716 } 1732 }