Mercurial > hg > orthanc
annotate Core/DicomParsing/FromDcmtkBridge.h @ 2439:66202ceff3f7
back to mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 Nov 2017 10:26:20 +0100 |
parents | e4045b3c9772 |
children | 878b59270859 |
rev | line source |
---|---|
0 | 1 /** |
62 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1004
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
2244
a3a65de1840f
shared copyright with osimis
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2232
diff
changeset
|
5 * Copyright (C) 2017 Osimis, Belgium |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU General Public License as | |
9 * published by the Free Software Foundation, either version 3 of the | |
10 * License, or (at your option) any later version. | |
136 | 11 * |
12 * In addition, as a special exception, the copyright holders of this | |
13 * program give permission to link the code of its release with the | |
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
15 * that use the same license as the "OpenSSL" library), and distribute | |
16 * the linked executables. You must obey the GNU General Public License | |
17 * in all respects for all of the code used other than "OpenSSL". If you | |
18 * modify file(s) with this exception, you may extend this exception to | |
19 * your version of the file(s), but you are not obligated to do so. If | |
20 * you do not wish to do so, delete this exception statement from your | |
21 * version. If you delete this exception statement from all source files | |
22 * in the program, then also delete it here. | |
0 | 23 * |
24 * This program is distributed in the hope that it will be useful, but | |
25 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
27 * General Public License for more details. | |
28 * | |
29 * You should have received a copy of the GNU General Public License | |
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
31 **/ | |
32 | |
33 | |
34 #pragma once | |
35 | |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
36 #include "../DicomFormat/DicomElement.h" |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
37 #include "../DicomFormat/DicomMap.h" |
791 | 38 |
0 | 39 #include <dcmtk/dcmdata/dcdatset.h> |
1831
3ae2ff249675
"/instances/.../header" to get the meta information (header) of the DICOM instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1818
diff
changeset
|
40 #include <dcmtk/dcmdata/dcmetinf.h> |
1924
6c73df12ca51
New URI: "/instances/.../frames/.../raw" to access the raw frames (bypass image decoding)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
41 #include <dcmtk/dcmdata/dcpixseq.h> |
1935
e251606c1433
FromDcmtkBridge::LoadFromMemoryBuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1934
diff
changeset
|
42 #include <dcmtk/dcmdata/dcfilefo.h> |
0 | 43 #include <json/json.h> |
44 | |
2380
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
45 #if !defined(ORTHANC_ENABLE_LUA) |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
46 # error The macro ORTHANC_ENABLE_LUA must be defined |
2232
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
47 #endif |
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
48 |
2380
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
49 #if ORTHANC_ENABLE_DCMTK != 1 |
96b3ec054b69
reorganization in macros
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
50 # error The macro ORTHANC_ENABLE_DCMTK must be set to 1 |
2232
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
51 #endif |
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
52 |
2126 | 53 #if ORTHANC_BUILD_UNIT_TESTS == 1 |
54 # include <gtest/gtest_prod.h> | |
55 #endif | |
56 | |
2232
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
57 #if ORTHANC_ENABLE_LUA == 1 |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
58 # include "../Lua/LuaFunctionCall.h" |
2232
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
59 #endif |
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
60 |
2381
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
61 #if !defined(ORTHANC_ENABLE_DCMTK_JPEG) |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
62 # error The macro ORTHANC_ENABLE_DCMTK_JPEG must be defined |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
63 #endif |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
64 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
65 #if !defined(ORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS) |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
66 # error The macro ORTHANC_ENABLE_DCMTK_JPEG_LOSSLESS must be defined |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
67 #endif |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
68 |
2126 | 69 |
62 | 70 namespace Orthanc |
0 | 71 { |
2125 | 72 class FromDcmtkBridge : public boost::noncopyable |
0 | 73 { |
2126 | 74 #if ORTHANC_BUILD_UNIT_TESTS == 1 |
75 FRIEND_TEST(FromDcmtkBridge, FromJson); | |
76 #endif | |
77 | |
2128
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2126
diff
changeset
|
78 friend class ParsedDicomFile; |
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2126
diff
changeset
|
79 |
2125 | 80 private: |
81 FromDcmtkBridge(); // Pure static class | |
82 | |
83 static void ExtractDicomSummary(DicomMap& target, | |
84 DcmItem& dataset, | |
85 unsigned int maxStringLength, | |
86 Encoding defaultEncoding); | |
87 | |
2126 | 88 static void DatasetToJson(Json::Value& parent, |
89 DcmItem& item, | |
90 DicomToJsonFormat format, | |
91 DicomToJsonFlags flags, | |
92 unsigned int maxStringLength, | |
2409
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
93 Encoding encoding, |
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
94 const std::set<DicomTag>& ignoreTagLength); |
2126 | 95 |
96 static void ElementToJson(Json::Value& parent, | |
97 DcmElement& element, | |
98 DicomToJsonFormat format, | |
99 DicomToJsonFlags flags, | |
100 unsigned int maxStringLength, | |
2409
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
101 Encoding dicomEncoding, |
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
102 const std::set<DicomTag>& ignoreTagLength); |
2126 | 103 |
2128
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2126
diff
changeset
|
104 static void ExtractDicomAsJson(Json::Value& target, |
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2126
diff
changeset
|
105 DcmDataset& dataset, |
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2126
diff
changeset
|
106 DicomToJsonFormat format, |
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2126
diff
changeset
|
107 DicomToJsonFlags flags, |
2131 | 108 unsigned int maxStringLength, |
2409
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
109 Encoding defaultEncoding, |
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
110 const std::set<DicomTag>& ignoreTagLength); |
2128
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2126
diff
changeset
|
111 |
2207
6dc3bdb4088b
Fix handling of encodings in C-FIND for worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2151
diff
changeset
|
112 static void ChangeStringEncoding(DcmItem& dataset, |
6dc3bdb4088b
Fix handling of encodings in C-FIND for worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2151
diff
changeset
|
113 Encoding source, |
6dc3bdb4088b
Fix handling of encodings in C-FIND for worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2151
diff
changeset
|
114 Encoding target); |
6dc3bdb4088b
Fix handling of encodings in C-FIND for worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2151
diff
changeset
|
115 |
0 | 116 public: |
2151
8cbb55089a1d
New configuration option: "LoadPrivateDictionary"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2131
diff
changeset
|
117 static void InitializeDictionary(bool loadPrivateDictionary); |
1656 | 118 |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1656
diff
changeset
|
119 static void RegisterDictionaryTag(const DicomTag& tag, |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1998
diff
changeset
|
120 ValueRepresentation vr, |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1656
diff
changeset
|
121 const std::string& name, |
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1656
diff
changeset
|
122 unsigned int minMultiplicity, |
2115
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
123 unsigned int maxMultiplicity, |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
124 const std::string& privateCreator); |
1657
5360cdba70d8
New function "OrthancPluginRegisterDictionaryTag()" to declare DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1656
diff
changeset
|
125 |
1936 | 126 static Encoding DetectEncoding(DcmItem& dataset, |
1928
84c7eaeb5244
Configuration::GetDefaultEncoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1924
diff
changeset
|
127 Encoding defaultEncoding); |
956
2fd5a163776d
primitives for proper encoding handling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
874
diff
changeset
|
128 |
991
2f76b92addd4
keep private tags during anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
956
diff
changeset
|
129 static DicomTag Convert(const DcmTag& tag); |
2f76b92addd4
keep private tags during anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
956
diff
changeset
|
130 |
0 | 131 static DicomTag GetTag(const DcmElement& element); |
132 | |
1655
e40fd0d925c5
/tools/create-dicom can create tags with unknown VR
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1417
diff
changeset
|
133 static bool IsUnknownTag(const DicomTag& tag); |
e40fd0d925c5
/tools/create-dicom can create tags with unknown VR
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1417
diff
changeset
|
134 |
956
2fd5a163776d
primitives for proper encoding handling
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
874
diff
changeset
|
135 static DicomValue* ConvertLeafElement(DcmElement& element, |
1736
b953c6eef28d
ToJson: IncludePrivateTags and IncludeUnknownTags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1735
diff
changeset
|
136 DicomToJsonFlags flags, |
1929
cda5b0ab4ce5
ORTHANC_MAXIMUM_TAG_LENGTH made explicit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1928
diff
changeset
|
137 unsigned int maxStringLength, |
2409
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
138 Encoding encoding, |
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
139 const std::set<DicomTag>& ignoreTagLength); |
0 | 140 |
2126 | 141 static void ExtractHeaderAsJson(Json::Value& target, |
142 DcmMetaInfo& header, | |
143 DicomToJsonFormat format, | |
144 DicomToJsonFlags flags, | |
145 unsigned int maxStringLength); | |
1831
3ae2ff249675
"/instances/.../header" to get the meta information (header) of the DICOM instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1818
diff
changeset
|
146 |
2115
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
147 static std::string GetTagName(const DicomTag& tag, |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
148 const std::string& privateCreator); |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
149 |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
150 static std::string GetTagName(const DcmElement& element); |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
151 |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
152 static std::string GetTagName(const DicomElement& element) |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
153 { |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
154 return GetTagName(element.GetTag(), ""); |
a657f7772e69
Handling of private tags/creators in the "Dictionary" configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
155 } |
0 | 156 |
304 | 157 static DicomTag ParseTag(const char* name); |
0 | 158 |
304 | 159 static DicomTag ParseTag(const std::string& name) |
0 | 160 { |
304 | 161 return ParseTag(name.c_str()); |
0 | 162 } |
163 | |
164 static bool HasTag(const DicomMap& fields, | |
165 const std::string& tagName) | |
166 { | |
304 | 167 return fields.HasTag(ParseTag(tagName)); |
0 | 168 } |
169 | |
170 static const DicomValue& GetValue(const DicomMap& fields, | |
171 const std::string& tagName) | |
172 { | |
304 | 173 return fields.GetValue(ParseTag(tagName)); |
0 | 174 } |
175 | |
176 static void SetValue(DicomMap& target, | |
177 const std::string& tagName, | |
178 DicomValue* value) | |
179 { | |
304 | 180 target.SetValue(ParseTag(tagName), value); |
0 | 181 } |
182 | |
183 static void ToJson(Json::Value& result, | |
1368 | 184 const DicomMap& values, |
185 bool simplify); | |
176 | 186 |
788 | 187 static std::string GenerateUniqueIdentifier(ResourceType level); |
291
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
285
diff
changeset
|
188 |
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
285
diff
changeset
|
189 static bool SaveToMemoryBuffer(std::string& buffer, |
1004
a226e0959d8b
DicomInstanceToStore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
991
diff
changeset
|
190 DcmDataset& dataSet); |
1360 | 191 |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1998
diff
changeset
|
192 static ValueRepresentation Convert(DcmEVR vr); |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1998
diff
changeset
|
193 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1998
diff
changeset
|
194 static ValueRepresentation LookupValueRepresentation(const DicomTag& tag); |
1689 | 195 |
196 static DcmElement* CreateElementForTag(const DicomTag& tag); | |
197 | |
198 static void FillElementWithString(DcmElement& element, | |
199 const DicomTag& tag, | |
1695 | 200 const std::string& utf8alue, // Encoded using UTF-8 |
1818
1065401501fb
ParsedDicomFile::CreateFromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1765
diff
changeset
|
201 bool decodeDataUriScheme, |
1695 | 202 Encoding dicomEncoding); |
1689 | 203 |
1693
558b25228a23
creation of tag hierarchy from json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1690
diff
changeset
|
204 static DcmElement* FromJson(const DicomTag& tag, |
1934
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
205 const Json::Value& element, // Encoded using UTF-8 |
1818
1065401501fb
ParsedDicomFile::CreateFromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1765
diff
changeset
|
206 bool decodeDataUriScheme, |
1695 | 207 Encoding dicomEncoding); |
1765
57b9e6890482
New configuration option: "Dictionary" to declare custom DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1737
diff
changeset
|
208 |
1924
6c73df12ca51
New URI: "/instances/.../frames/.../raw" to access the raw frames (bypass image decoding)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
209 static DcmPixelSequence* GetPixelSequence(DcmDataset& dataset); |
1934
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
210 |
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
211 static Encoding ExtractEncoding(const Json::Value& json, |
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
212 Encoding defaultEncoding); |
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
213 |
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
214 static DcmDataset* FromJson(const Json::Value& json, // Encoded using UTF-8 |
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
215 bool generateIdentifiers, |
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
216 bool decodeDataUriScheme, |
72a2fd7fed8b
FromDcmtkBridge::FromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1929
diff
changeset
|
217 Encoding defaultEncoding); |
1935
e251606c1433
FromDcmtkBridge::LoadFromMemoryBuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1934
diff
changeset
|
218 |
e251606c1433
FromDcmtkBridge::LoadFromMemoryBuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1934
diff
changeset
|
219 static DcmFileFormat* LoadFromMemoryBuffer(const void* buffer, |
e251606c1433
FromDcmtkBridge::LoadFromMemoryBuffer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1934
diff
changeset
|
220 size_t size); |
1998
9b61701c35f2
New URI "/modalities/.../move" to issue C-Move SCU requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1936
diff
changeset
|
221 |
9b61701c35f2
New URI "/modalities/.../move" to issue C-Move SCU requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1936
diff
changeset
|
222 static void FromJson(DicomMap& values, |
9b61701c35f2
New URI "/modalities/.../move" to issue C-Move SCU requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1936
diff
changeset
|
223 const Json::Value& result); |
2209
e3fd5bc429a2
URI to reconstruct the main DICOM tags, the JSON summary and the metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2207
diff
changeset
|
224 |
e3fd5bc429a2
URI to reconstruct the main DICOM tags, the JSON summary and the metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2207
diff
changeset
|
225 static bool LookupTransferSyntax(std::string& result, |
e3fd5bc429a2
URI to reconstruct the main DICOM tags, the JSON summary and the metadata
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2207
diff
changeset
|
226 DcmFileFormat& dicom); |
2218
3eefb84ac0bd
dynamically fix outgoing C-Find requests using "OutgoingFindRequestFilter()"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2209
diff
changeset
|
227 |
2232
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
228 #if ORTHANC_ENABLE_LUA == 1 |
2218
3eefb84ac0bd
dynamically fix outgoing C-Find requests using "OutgoingFindRequestFilter()"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2209
diff
changeset
|
229 static void ExecuteToDicom(DicomMap& target, |
3eefb84ac0bd
dynamically fix outgoing C-Find requests using "OutgoingFindRequestFilter()"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2209
diff
changeset
|
230 LuaFunctionCall& call); |
2232
3dd44baebc36
macro ORTHANC_ENABLE_LUA for orthanc-wsi
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2218
diff
changeset
|
231 #endif |
2381
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
232 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
233 static void ExtractDicomSummary(DicomMap& target, |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
234 DcmItem& dataset); |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
235 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
236 static void ExtractDicomAsJson(Json::Value& target, |
2409
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
237 DcmDataset& dataset, |
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
238 const std::set<DicomTag>& ignoreTagLength); |
2381
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
239 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
240 static void InitializeCodecs(); |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
241 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2380
diff
changeset
|
242 static void FinalizeCodecs(); |
0 | 243 }; |
244 } |