annotate OrthancServer/ExportedResource.h @ 1806:cd213ebcaefd

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