comparison OrthancServer/Plugins/Samples/MultitenantDicom/PluginToolbox.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/RemoteModalityParameters.h"
29
30 #include <json/value.h>
31
32 namespace PluginToolbox
33 {
34 bool IsValidLabel(const std::string& label);
35
36 Orthanc::ResourceType ParseQueryRetrieveLevel(const std::string& level);
37
38 bool IsSameAETitle(bool isStrict,
39 const std::string& aet1,
40 const std::string& aet2);
41
42 bool LookupAETitle(std::string& name,
43 Orthanc::RemoteModalityParameters& parameters,
44 bool isStrict,
45 const std::string& aet);
46
47 void ParseLabels(std::set<std::string>& targetLabels,
48 LabelsConstraint& targetConstraint,
49 const Json::Value& serverConfig);
50
51 void AddLabelsToFindRequest(Json::Value& request,
52 const std::set<std::string>& labels,
53 LabelsConstraint constraint);
54
55 LabelsConstraint StringToLabelsConstraint(const std::string& s);
56 }