Mercurial > hg > orthanc
comparison OrthancServer/Plugins/Samples/MultitenantDicom/MoveRequestHandler.h @ 5273:7cb1b851f5c8
Added a sample plugin bringing multitenant DICOM support through labels
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 14 Apr 2023 11:49:24 +0200 |
parents | |
children | a8385880902f |
comparison
equal
deleted
inserted
replaced
5272:a45e8b6115f6 | 5273:7cb1b851f5c8 |
---|---|
1 /** | |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium | |
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
7 * | |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU Lesser General Public License | |
10 * as published by the Free Software Foundation, either version 3 of | |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Lesser General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Lesser General Public | |
19 * License along with this program. If not, see | |
20 * <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 | |
24 #pragma once | |
25 | |
26 #include "PluginEnumerations.h" | |
27 | |
28 #include "../../../../OrthancFramework/Sources/DicomNetworking/IMoveRequestHandler.h" | |
29 | |
30 | |
31 class MoveRequestHandler : public Orthanc::IMoveRequestHandler | |
32 { | |
33 private: | |
34 class Iterator; | |
35 | |
36 // Everything is constant, so no need for a mutex | |
37 const std::set<std::string> labels_; | |
38 const LabelsConstraint constraint_; | |
39 const bool isStrictAet_; | |
40 const bool isSynchronous_; | |
41 | |
42 void ExecuteLookup(std::set<std::string>& publicIds, | |
43 Orthanc::ResourceType level, | |
44 const Orthanc::DicomTag& tag, | |
45 const std::string& value) const; | |
46 | |
47 void LookupIdentifiers(std::set<std::string>& publicIds, | |
48 Orthanc::ResourceType level, | |
49 const Orthanc::DicomMap& input) const; | |
50 | |
51 public: | |
52 MoveRequestHandler(const std::set<std::string>& labels, | |
53 LabelsConstraint constraint, | |
54 bool isStrictAet, | |
55 bool isSynchronous) : | |
56 labels_(labels), | |
57 constraint_(constraint), | |
58 isStrictAet_(isStrictAet), | |
59 isSynchronous_(isSynchronous) | |
60 { | |
61 } | |
62 | |
63 virtual Orthanc::IMoveRequestIterator* Handle(const std::string& targetAet, | |
64 const Orthanc::DicomMap& input, | |
65 const std::string& originatorIp, | |
66 const std::string& originatorAet, | |
67 const std::string& calledAet, | |
68 uint16_t originatorId) ORTHANC_OVERRIDE; | |
69 }; |