comparison Plugins/Engine/OrthancPlugins.cpp @ 2210:7bcff7bb7cbf

OrthancPluginFindMatcher
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Dec 2016 18:02:03 +0100
parents 84d1d392a9ab
children 028214a95194
comparison
equal deleted inserted replaced
2209:e3fd5bc429a2 2210:7bcff7bb7cbf
2590 *reinterpret_cast<const _OrthancPluginRetrieveDynamicString*>(parameters)->result = 2590 *reinterpret_cast<const _OrthancPluginRetrieveDynamicString*>(parameters)->result =
2591 CopyString(SystemToolbox::GenerateUuid()); 2591 CopyString(SystemToolbox::GenerateUuid());
2592 return true; 2592 return true;
2593 } 2593 }
2594 2594
2595 case _OrthancPluginService_CreateFindMatcher:
2596 {
2597 const _OrthancPluginCreateFindMatcher& p =
2598 *reinterpret_cast<const _OrthancPluginCreateFindMatcher*>(parameters);
2599 ParsedDicomFile query(p.query, p.size);
2600 *(p.target) = reinterpret_cast<OrthancPluginFindMatcher*>
2601 (new HierarchicalMatcher(query, Configuration::GetGlobalBoolParameter("CaseSensitivePN", false)));
2602 return true;
2603 }
2604
2605 case _OrthancPluginService_FreeFindMatcher:
2606 {
2607 const _OrthancPluginFreeFindMatcher& p =
2608 *reinterpret_cast<const _OrthancPluginFreeFindMatcher*>(parameters);
2609
2610 if (p.matcher == NULL)
2611 {
2612 throw OrthancException(ErrorCode_ParameterOutOfRange);
2613 }
2614 else
2615 {
2616 delete reinterpret_cast<HierarchicalMatcher*>(p.matcher);
2617 return true;
2618 }
2619 }
2620
2621 case _OrthancPluginService_FindMatcherIsMatch:
2622 {
2623 const _OrthancPluginFindMatcherIsMatch& p =
2624 *reinterpret_cast<const _OrthancPluginFindMatcherIsMatch*>(parameters);
2625
2626 if (p.matcher == NULL)
2627 {
2628 throw OrthancException(ErrorCode_ParameterOutOfRange);
2629 }
2630 else
2631 {
2632 ParsedDicomFile query(p.dicom, p.size);
2633 reinterpret_cast<const HierarchicalMatcher*>(p.matcher)->Match(query);
2634 return true;
2635 }
2636 }
2637
2595 default: 2638 default:
2596 return false; 2639 return false;
2597 } 2640 }
2598 } 2641 }
2599 2642