annotate OrthancServer/Sources/ExportedResource.h @ 5503:5910aa0c96ce

upgraded to curl 8.5.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 24 Jan 2024 17:31:12 +0100
parents 48b8dae6dc77
children f7adfb22e20e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1242
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Orthanc - A Lightweight, RESTful DICOM Store
1900
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1288
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
1288
6e7e5ed91c2d upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1247
diff changeset
4 * Department, University Hospital of Liege, Belgium
5485
48b8dae6dc77 upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
5 * Copyright (C) 2017-2024 Osimis S.A., Belgium
48b8dae6dc77 upgrade to year 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 5185
diff changeset
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
1242
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 *
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * modify it under the terms of the GNU General Public License as
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * published by the Free Software Foundation, either version 3 of the
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 * License, or (at your option) any later version.
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 *
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * General Public License for more details.
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 *
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 **/
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #pragma once
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include "ServerEnumerations.h"
4045
05b8fd21089c fix path
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 4044
diff changeset
26 #include "../../OrthancFramework/Sources/Toolbox.h"
1242
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #include <string>
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 #include <json/value.h>
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 namespace Orthanc
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 {
1247
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1246
diff changeset
33 class ExportedResource
1242
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 private:
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 int64_t seq_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 ResourceType resourceType_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 std::string publicId_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 std::string modality_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 std::string date_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 std::string patientId_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 std::string studyInstanceUid_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 std::string seriesInstanceUid_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 std::string sopInstanceUid_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 public:
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ExportedResource(int64_t seq,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ResourceType resourceType,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 const std::string& publicId,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 const std::string& modality,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 const std::string& date,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 const std::string& patientId,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 const std::string& studyInstanceUid,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 const std::string& seriesInstanceUid,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 const std::string& sopInstanceUid) :
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 seq_(seq),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 resourceType_(resourceType),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 publicId_(publicId),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 modality_(modality),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 date_(date),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 patientId_(patientId),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 studyInstanceUid_(studyInstanceUid),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 seriesInstanceUid_(seriesInstanceUid),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 sopInstanceUid_(sopInstanceUid)
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 int64_t GetSeq() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 return seq_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 ResourceType GetResourceType() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 return resourceType_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 const std::string& GetPublicId() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 return publicId_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 const std::string& GetModality() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 return modality_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 const std::string& GetDate() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 return date_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
1246
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
93 const std::string& GetPatientId() const
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
94 {
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
95 return patientId_;
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
96 }
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
97
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
98 const std::string& GetStudyInstanceUid() const
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
99 {
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
100 return studyInstanceUid_;
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
101 }
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
102
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
103 const std::string& GetSeriesInstanceUid() const
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
104 {
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
105 return seriesInstanceUid_;
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
106 }
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
107
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
108 const std::string& GetSopInstanceUid() const
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
109 {
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
110 return sopInstanceUid_;
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
111 }
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
112
1247
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1246
diff changeset
113 void Format(Json::Value& item) const;
1242
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 };
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 }