annotate OrthancServer/ExportedResource.h @ 3875:ea1d32861cfc transcoding

moving timeout from DicomAssocation to DicomAssociationParameters
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 May 2020 14:49:31 +0200
parents 94f4a18a79cc
children
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
3640
94f4a18a79cc upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 3060
diff changeset
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium
1242
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU General Public License as
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * published by the Free Software Foundation, either version 3 of the
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * License, or (at your option) any later version.
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * In addition, as a special exception, the copyright holders of this
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * program give permission to link the code of its release with the
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * that use the same license as the "OpenSSL" library), and distribute
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 * the linked executables. You must obey the GNU General Public License
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * in all respects for all of the code used other than "OpenSSL". If you
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * modify file(s) with this exception, you may extend this exception to
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 * your version of the file(s), but you are not obligated to do so. If
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 * you do not wish to do so, delete this exception statement from your
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 * version. If you delete this exception statement from all source files
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 * in the program, then also delete it here.
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 *
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 * This program is distributed in the hope that it will be useful, but
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 * WITHOUT ANY WARRANTY; without even the implied warranty of
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 * General Public License for more details.
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 *
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29 * You should have received a copy of the GNU General Public License
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 **/
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 #pragma once
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 #include "ServerEnumerations.h"
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 #include "../Core/Toolbox.h"
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 #include <string>
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 #include <json/value.h>
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 namespace Orthanc
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 {
1247
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1246
diff changeset
44 class ExportedResource
1242
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 private:
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 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 std::string publicId_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 std::string modality_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 std::string date_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 std::string patientId_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 std::string studyInstanceUid_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 std::string seriesInstanceUid_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 std::string sopInstanceUid_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 public:
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 ExportedResource(int64_t seq,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 ResourceType resourceType,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 const std::string& publicId,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61 const std::string& modality,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 const std::string& date,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 const std::string& patientId,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 const std::string& studyInstanceUid,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 const std::string& seriesInstanceUid,
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 const std::string& sopInstanceUid) :
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 seq_(seq),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 resourceType_(resourceType),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 publicId_(publicId),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 modality_(modality),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 date_(date),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 patientId_(patientId),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 studyInstanceUid_(studyInstanceUid),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 seriesInstanceUid_(seriesInstanceUid),
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 sopInstanceUid_(sopInstanceUid)
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
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 int64_t GetSeq() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 return seq_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 ResourceType GetResourceType() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 return resourceType_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 const std::string& GetPublicId() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 return publicId_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 const std::string& GetModality() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 return modality_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 const std::string& GetDate() const
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 {
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 return date_;
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 }
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
1246
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
104 const std::string& GetPatientId() const
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
105 {
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
106 return patientId_;
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
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
109 const std::string& GetStudyInstanceUid() const
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
110 {
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
111 return studyInstanceUid_;
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
112 }
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
113
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
114 const std::string& GetSeriesInstanceUid() const
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
115 {
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
116 return seriesInstanceUid_;
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
117 }
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
118
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
119 const std::string& GetSopInstanceUid() const
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
120 {
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
121 return sopInstanceUid_;
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
122 }
54bf0f0245f4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1244
diff changeset
123
1247
32fcc5dc7562 abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1246
diff changeset
124 void Format(Json::Value& item) const;
1242
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 };
58e6a89c3ef4 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 }