comparison OrthancServer/DicomInstanceToStore.h @ 2640:c691fcf66071 jobs

ResourceModificationJob
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 28 May 2018 16:30:17 +0200
parents 878b59270859
children a21b244efb37
comparison
equal deleted inserted replaced
2639:75a404e40323 2640:c691fcf66071
32 32
33 33
34 #pragma once 34 #pragma once
35 35
36 #include "../Core/DicomParsing/ParsedDicomFile.h" 36 #include "../Core/DicomParsing/ParsedDicomFile.h"
37 #include "../Core/OrthancException.h"
38 #include "DicomInstanceOrigin.h"
37 #include "ServerIndex.h" 39 #include "ServerIndex.h"
38 #include "../Core/OrthancException.h"
39 #include "../Core/RestApi/RestApiCall.h"
40 40
41 namespace Orthanc 41 namespace Orthanc
42 { 42 {
43 class DicomInstanceToStore 43 class DicomInstanceToStore
44 { 44 {
137 137
138 return *content_; 138 return *content_;
139 } 139 }
140 }; 140 };
141 141
142 142 DicomInstanceOrigin origin_;
143 SmartContainer<std::string> buffer_; 143 SmartContainer<std::string> buffer_;
144 SmartContainer<ParsedDicomFile> parsed_; 144 SmartContainer<ParsedDicomFile> parsed_;
145 SmartContainer<DicomMap> summary_; 145 SmartContainer<DicomMap> summary_;
146 SmartContainer<Json::Value> json_; 146 SmartContainer<Json::Value> json_;
147 147 ServerIndex::MetadataMap metadata_;
148 RequestOrigin origin_;
149 std::string remoteIp_;
150 std::string dicomRemoteAet_;
151 std::string dicomCalledAet_;
152 std::string httpUsername_;
153 ServerIndex::MetadataMap metadata_;
154 148
155 void ComputeMissingInformation(); 149 void ComputeMissingInformation();
156 150
157 public: 151 public:
158 DicomInstanceToStore() : origin_(RequestOrigin_Unknown) 152 void SetOrigin(const DicomInstanceOrigin& origin)
159 { 153 {
160 } 154 origin_ = origin;
161 155 }
162 void SetDicomProtocolOrigin(const char* remoteIp, 156
163 const char* remoteAet, 157 DicomInstanceOrigin& GetOrigin()
164 const char* calledAet);
165
166 void SetRestOrigin(const RestApiCall& call);
167
168 void SetHttpOrigin(const char* remoteIp,
169 const char* username);
170
171 void SetLuaOrigin();
172
173 void SetPluginsOrigin();
174
175 RequestOrigin GetRequestOrigin() const
176 { 158 {
177 return origin_; 159 return origin_;
178 } 160 }
179 161
180 const char* GetRemoteAet() const; 162 const DicomInstanceOrigin& GetOrigin() const
181 163 {
164 return origin_;
165 }
166
182 void SetBuffer(const std::string& dicom) 167 void SetBuffer(const std::string& dicom)
183 { 168 {
184 buffer_.SetConstReference(dicom); 169 buffer_.SetConstReference(dicom);
185 } 170 }
186 171
219 204
220 const DicomMap& GetSummary(); 205 const DicomMap& GetSummary();
221 206
222 const Json::Value& GetJson(); 207 const Json::Value& GetJson();
223 208
224 void GetOriginInformation(Json::Value& result) const;
225
226 bool LookupTransferSyntax(std::string& result); 209 bool LookupTransferSyntax(std::string& result);
227 }; 210 };
228 } 211 }