annotate OrthancServer/Plugins/Samples/MultitenantDicom/MoveRequestHandler.h @ 5485:48b8dae6dc77

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