Mercurial > hg > orthanc
comparison OrthancServer/Sources/DicomInstanceToStore.cpp @ 4140:0ddc5297a8ab
centralization of default parameters for JSON/DicomMap conversions from DCMTK
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Aug 2020 10:46:50 +0200 |
parents | 6774605d4341 |
children | 92737070b301 |
comparison
equal
deleted
inserted
replaced
4139:a4f28efdfccf | 4140:0ddc5297a8ab |
---|---|
32 | 32 |
33 | 33 |
34 #include "PrecompiledHeadersServer.h" | 34 #include "PrecompiledHeadersServer.h" |
35 #include "DicomInstanceToStore.h" | 35 #include "DicomInstanceToStore.h" |
36 | 36 |
37 #include "OrthancConfiguration.h" | |
38 | |
37 #include "../../OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h" | 39 #include "../../OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.h" |
38 #include "../../OrthancFramework/Sources/DicomParsing/ParsedDicomFile.h" | 40 #include "../../OrthancFramework/Sources/DicomParsing/ParsedDicomFile.h" |
39 #include "../../OrthancFramework/Sources/Logging.h" | 41 #include "../../OrthancFramework/Sources/Logging.h" |
40 #include "../../OrthancFramework/Sources/OrthancException.h" | 42 #include "../../OrthancFramework/Sources/OrthancException.h" |
41 | 43 |
239 | 241 |
240 ParseDicomFile(); | 242 ParseDicomFile(); |
241 assert(parsed_.HasContent()); | 243 assert(parsed_.HasContent()); |
242 | 244 |
243 // At this point, we have parsed the DICOM file | 245 // At this point, we have parsed the DICOM file |
244 std::set<DicomTag> ignoreTagLength; | |
245 | 246 |
246 if (!summary_.HasContent()) | 247 if (!summary_.HasContent()) |
247 { | 248 { |
248 summary_.Allocate(); | 249 summary_.Allocate(); |
249 FromDcmtkBridge::ExtractDicomSummary(summary_.GetContent(), | 250 OrthancConfiguration::DefaultExtractDicomSummary(summary_.GetContent(), parsed_.GetContent()); |
250 *parsed_.GetContent().GetDcmtkObject().getDataset(), | |
251 ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); | |
252 } | 251 } |
253 | 252 |
254 if (!json_.HasContent()) | 253 if (!json_.HasContent()) |
255 { | 254 { |
256 json_.Allocate(); | 255 json_.Allocate(); |
257 FromDcmtkBridge::ExtractDicomAsJson(json_.GetContent(), | 256 OrthancConfiguration::DefaultDicomDatasetToJson(json_.GetContent(), parsed_.GetContent()); |
258 *parsed_.GetContent().GetDcmtkObject().getDataset(), | |
259 ignoreTagLength); | |
260 } | 257 } |
261 } | 258 } |
262 | 259 |
263 | 260 |
264 public: | 261 public: |