Mercurial > hg > orthanc
diff OrthancServer/main.cpp @ 1796:5e08a5fe6b27 worklists
HierarchicalMatcher - extracting tags
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 19 Nov 2015 18:32:00 +0100 |
parents | af6840eb23ee |
children | 23722a191e4e |
line wrap: on
line diff
--- a/OrthancServer/main.cpp Thu Nov 19 17:41:22 2015 +0100 +++ b/OrthancServer/main.cpp Thu Nov 19 18:32:00 2015 +0100 @@ -107,6 +107,7 @@ const std::string& remoteIp, const std::string& remoteAet) { + printf("=====================================================================\n"); printf("Worklist\n"); bool caseSensitivePN = Configuration::GetGlobalBoolParameter("CaseSensitivePN", false); @@ -114,6 +115,24 @@ std::cout << matcher.Format(); + for (unsigned int i = 1; i <= 10; i++) + { + std::string p = "/tmp/worklists/db/OFFIS/item" + boost::lexical_cast<std::string>(i) + ".wl"; + std::string s; + Toolbox::ReadFile(s, p); + ParsedDicomFile f(s); + std::cout << p << " => " << matcher.Match(f) << std::endl; + + if (matcher.Match(f)) + { + std::auto_ptr<ParsedDicomFile> e(matcher.Extract(f)); + + Json::Value v; + e->ToJson(v, DicomToJsonFormat_Short, DicomToJsonFlags_Default, 0); + std::cout << v; + } + } + return true; } };