Mercurial > hg > orthanc
annotate Core/DicomFormat/DicomTag.h @ 2110:5b818f677dd6
fix in BagOfTasksProcessor
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 26 Oct 2016 15:36:39 +0200 |
parents | b1291df2f780 |
children | c4b3259c8bce |
rev | line source |
---|---|
0 | 1 /** |
59 | 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:
1279
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
0 | 5 * |
6 * This program is free software: you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation, either version 3 of the | |
9 * License, or (at your option) any later version. | |
136 | 10 * |
11 * In addition, as a special exception, the copyright holders of this | |
12 * program give permission to link the code of its release with the | |
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
14 * that use the same license as the "OpenSSL" library), and distribute | |
15 * the linked executables. You must obey the GNU General Public License | |
16 * in all respects for all of the code used other than "OpenSSL". If you | |
17 * modify file(s) with this exception, you may extend this exception to | |
18 * your version of the file(s), but you are not obligated to do so. If | |
19 * you do not wish to do so, delete this exception statement from your | |
20 * version. If you delete this exception statement from all source files | |
21 * in the program, then also delete it here. | |
0 | 22 * |
23 * This program is distributed in the hope that it will be useful, but | |
24 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
26 * General Public License for more details. | |
27 * | |
28 * You should have received a copy of the GNU General Public License | |
29 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
30 **/ | |
31 | |
32 | |
33 #pragma once | |
34 | |
35 #include <string> | |
961 | 36 #include <set> |
0 | 37 #include <stdint.h> |
38 | |
961 | 39 #include "../Enumerations.h" |
0 | 40 |
59 | 41 namespace Orthanc |
0 | 42 { |
43 class DicomTag | |
44 { | |
45 // This must stay a POD (plain old data structure) | |
46 | |
47 private: | |
48 uint16_t group_; | |
49 uint16_t element_; | |
50 | |
51 public: | |
52 DicomTag(uint16_t group, | |
53 uint16_t element) : | |
54 group_(group), | |
55 element_(element) | |
56 { | |
57 } | |
58 | |
59 uint16_t GetGroup() const | |
60 { | |
61 return group_; | |
62 } | |
63 | |
64 uint16_t GetElement() const | |
65 { | |
66 return element_; | |
67 } | |
68 | |
1818
1065401501fb
ParsedDicomFile::CreateFromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1755
diff
changeset
|
69 bool IsPrivate() const |
1065401501fb
ParsedDicomFile::CreateFromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1755
diff
changeset
|
70 { |
1065401501fb
ParsedDicomFile::CreateFromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1755
diff
changeset
|
71 return group_ % 2 == 1; |
1065401501fb
ParsedDicomFile::CreateFromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1755
diff
changeset
|
72 } |
1065401501fb
ParsedDicomFile::CreateFromJson
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1755
diff
changeset
|
73 |
291
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
136
diff
changeset
|
74 const char* GetMainTagsName() const; |
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
136
diff
changeset
|
75 |
0 | 76 bool operator< (const DicomTag& other) const; |
77 | |
106 | 78 bool operator== (const DicomTag& other) const |
79 { | |
80 return group_ == other.group_ && element_ == other.element_; | |
81 } | |
82 | |
83 bool operator!= (const DicomTag& other) const | |
84 { | |
85 return !(*this == other); | |
86 } | |
87 | |
35
f6d12037f886
full json vs. simplified json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
88 std::string Format() const; |
f6d12037f886
full json vs. simplified json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
89 |
0 | 90 friend std::ostream& operator<< (std::ostream& o, const DicomTag& tag); |
961 | 91 |
1368 | 92 static void AddTagsForModule(std::set<DicomTag>& target, |
1276
6164f7200c43
refactoring modules
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1162
diff
changeset
|
93 DicomModule module); |
80 | 94 }; |
77 | 95 |
80 | 96 // Aliases for the most useful tags |
97 static const DicomTag DICOM_TAG_ACCESSION_NUMBER(0x0008, 0x0050); | |
98 static const DicomTag DICOM_TAG_SOP_INSTANCE_UID(0x0008, 0x0018); | |
99 static const DicomTag DICOM_TAG_PATIENT_ID(0x0010, 0x0020); | |
100 static const DicomTag DICOM_TAG_SERIES_INSTANCE_UID(0x0020, 0x000e); | |
101 static const DicomTag DICOM_TAG_STUDY_INSTANCE_UID(0x0020, 0x000d); | |
102 static const DicomTag DICOM_TAG_PIXEL_DATA(0x7fe0, 0x0010); | |
77 | 103 |
80 | 104 static const DicomTag DICOM_TAG_IMAGE_INDEX(0x0054, 0x1330); |
105 static const DicomTag DICOM_TAG_INSTANCE_NUMBER(0x0020, 0x0013); | |
106 | |
107 static const DicomTag DICOM_TAG_NUMBER_OF_SLICES(0x0054, 0x0081); | |
433 | 108 static const DicomTag DICOM_TAG_NUMBER_OF_TIME_SLICES(0x0054, 0x0101); |
80 | 109 static const DicomTag DICOM_TAG_NUMBER_OF_FRAMES(0x0028, 0x0008); |
110 static const DicomTag DICOM_TAG_CARDIAC_NUMBER_OF_IMAGES(0x0018, 0x1090); | |
111 static const DicomTag DICOM_TAG_IMAGES_IN_ACQUISITION(0x0020, 0x1002); | |
106 | 112 static const DicomTag DICOM_TAG_PATIENT_NAME(0x0010, 0x0010); |
1556
b8dc2f855a83
Preview of PDF files encapsulated in DICOM from Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
113 static const DicomTag DICOM_TAG_ENCAPSULATED_DOCUMENT(0x0042, 0x0011); |
303
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
114 |
1716
2ca7888f8600
refactoring DicomIdentifiers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1702
diff
changeset
|
115 static const DicomTag DICOM_TAG_STUDY_DESCRIPTION(0x0008, 0x1030); |
2ca7888f8600
refactoring DicomIdentifiers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1702
diff
changeset
|
116 static const DicomTag DICOM_TAG_SERIES_DESCRIPTION(0x0008, 0x103e); |
1755
39c37a994b2f
handling of DICOM_TAG_MODALITIES_IN_STUDY
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1725
diff
changeset
|
117 static const DicomTag DICOM_TAG_MODALITY(0x0008, 0x0060); |
1716
2ca7888f8600
refactoring DicomIdentifiers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1702
diff
changeset
|
118 |
1279
7f3a65e84d4b
More flexible /modify and /anonymize for single instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1276
diff
changeset
|
119 // The following is used for "modify/anonymize" operations |
303
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
120 static const DicomTag DICOM_TAG_SOP_CLASS_UID(0x0008, 0x0016); |
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
121 static const DicomTag DICOM_TAG_MEDIA_STORAGE_SOP_CLASS_UID(0x0002, 0x0002); |
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
122 static const DicomTag DICOM_TAG_MEDIA_STORAGE_SOP_INSTANCE_UID(0x0002, 0x0003); |
1279
7f3a65e84d4b
More flexible /modify and /anonymize for single instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1276
diff
changeset
|
123 static const DicomTag DICOM_TAG_DEIDENTIFICATION_METHOD(0x0012, 0x0063); |
433 | 124 |
441 | 125 // DICOM tags used for fMRI (thanks to Will Ryder) |
433 | 126 static const DicomTag DICOM_TAG_NUMBER_OF_TEMPORAL_POSITIONS(0x0020, 0x0105); |
127 static const DicomTag DICOM_TAG_TEMPORAL_POSITION_IDENTIFIER(0x0020, 0x0100); | |
559 | 128 |
129 // Tags for C-FIND and C-MOVE | |
130 static const DicomTag DICOM_TAG_SPECIFIC_CHARACTER_SET(0x0008, 0x0005); | |
131 static const DicomTag DICOM_TAG_QUERY_RETRIEVE_LEVEL(0x0008, 0x0052); | |
611
9924aec1d694
filtering on modalities
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
559
diff
changeset
|
132 static const DicomTag DICOM_TAG_MODALITIES_IN_STUDY(0x0008, 0x0061); |
800
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
133 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
134 // Tags for images |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
135 static const DicomTag DICOM_TAG_COLUMNS(0x0028, 0x0011); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
136 static const DicomTag DICOM_TAG_ROWS(0x0028, 0x0010); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
137 static const DicomTag DICOM_TAG_SAMPLES_PER_PIXEL(0x0028, 0x0002); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
138 static const DicomTag DICOM_TAG_BITS_ALLOCATED(0x0028, 0x0100); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
139 static const DicomTag DICOM_TAG_BITS_STORED(0x0028, 0x0101); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
140 static const DicomTag DICOM_TAG_HIGH_BIT(0x0028, 0x0102); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
141 static const DicomTag DICOM_TAG_PIXEL_REPRESENTATION(0x0028, 0x0103); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
142 static const DicomTag DICOM_TAG_PLANAR_CONFIGURATION(0x0028, 0x0006); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
143 static const DicomTag DICOM_TAG_PHOTOMETRIC_INTERPRETATION(0x0028, 0x0004); |
1702
9980875edc7c
started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1556
diff
changeset
|
144 static const DicomTag DICOM_TAG_IMAGE_ORIENTATION_PATIENT(0x0020, 0x0037); |
9980875edc7c
started work on SliceOrdering
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1556
diff
changeset
|
145 static const DicomTag DICOM_TAG_IMAGE_POSITION_PATIENT(0x0020, 0x0032); |
1555
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
146 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
147 // Tags related to date and time |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
148 static const DicomTag DICOM_TAG_ACQUISITION_DATE(0x0008, 0x0022); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
149 static const DicomTag DICOM_TAG_ACQUISITION_TIME(0x0008, 0x0032); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
150 static const DicomTag DICOM_TAG_CONTENT_DATE(0x0008, 0x0023); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
151 static const DicomTag DICOM_TAG_CONTENT_TIME(0x0008, 0x0033); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
152 static const DicomTag DICOM_TAG_INSTANCE_CREATION_DATE(0x0008, 0x0012); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
153 static const DicomTag DICOM_TAG_INSTANCE_CREATION_TIME(0x0008, 0x0013); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
154 static const DicomTag DICOM_TAG_PATIENT_BIRTH_DATE(0x0010, 0x0030); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
155 static const DicomTag DICOM_TAG_PATIENT_BIRTH_TIME(0x0010, 0x0032); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
156 static const DicomTag DICOM_TAG_SERIES_DATE(0x0008, 0x0021); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
157 static const DicomTag DICOM_TAG_SERIES_TIME(0x0008, 0x0031); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
158 static const DicomTag DICOM_TAG_STUDY_DATE(0x0008, 0x0020); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1429
diff
changeset
|
159 static const DicomTag DICOM_TAG_STUDY_TIME(0x0008, 0x0030); |
1841
5d8134e54c03
DICOM_TAG_SERIES_TYPE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1818
diff
changeset
|
160 |
5d8134e54c03
DICOM_TAG_SERIES_TYPE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1818
diff
changeset
|
161 // Various tags |
5d8134e54c03
DICOM_TAG_SERIES_TYPE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1818
diff
changeset
|
162 static const DicomTag DICOM_TAG_SERIES_TYPE(0x0054, 0x1000); |
1848
e39716f71d67
new main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1841
diff
changeset
|
163 static const DicomTag DICOM_TAG_REQUESTED_PROCEDURE_DESCRIPTION(0x0032, 0x1060); |
e39716f71d67
new main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1841
diff
changeset
|
164 static const DicomTag DICOM_TAG_INSTITUTION_NAME(0x0008, 0x0080); |
e39716f71d67
new main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1841
diff
changeset
|
165 static const DicomTag DICOM_TAG_REQUESTING_PHYSICIAN(0x0032, 0x1032); |
e39716f71d67
new main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1841
diff
changeset
|
166 static const DicomTag DICOM_TAG_REFERRING_PHYSICIAN_NAME(0x0008, 0x0090); |
e39716f71d67
new main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1841
diff
changeset
|
167 static const DicomTag DICOM_TAG_OPERATOR_NAME(0x0008, 0x1070); |
e39716f71d67
new main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1841
diff
changeset
|
168 static const DicomTag DICOM_TAG_PERFORMED_PROCEDURE_STEP_DESCRIPTION(0x0040, 0x0254); |
e39716f71d67
new main dicom tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1841
diff
changeset
|
169 static const DicomTag DICOM_TAG_IMAGE_COMMENTS(0x0020, 0x4000); |
1850
68854412c7bc
new main dicomtags: AcquisitionDeviceProcessingDescription and ContrastBolusAgent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1848
diff
changeset
|
170 static const DicomTag DICOM_TAG_ACQUISITION_DEVICE_PROCESSING_DESCRIPTION(0x0018, 0x1400); |
68854412c7bc
new main dicomtags: AcquisitionDeviceProcessingDescription and ContrastBolusAgent
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1848
diff
changeset
|
171 static const DicomTag DICOM_TAG_CONTRAST_BOLUS_AGENT(0x0018, 0x0010); |
1898
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
172 |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
173 // Counting patients, studies and series |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
174 // https://www.medicalconnections.co.uk/kb/Counting_Studies_Series_and_Instances |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
175 static const DicomTag DICOM_TAG_NUMBER_OF_PATIENT_RELATED_STUDIES(0x0020, 0x1200); |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
176 static const DicomTag DICOM_TAG_NUMBER_OF_PATIENT_RELATED_SERIES(0x0020, 0x1202); |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
177 static const DicomTag DICOM_TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES(0x0020, 0x1204); |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
178 static const DicomTag DICOM_TAG_NUMBER_OF_STUDY_RELATED_SERIES(0x0020, 0x1206); |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
179 static const DicomTag DICOM_TAG_NUMBER_OF_STUDY_RELATED_INSTANCES(0x0020, 0x1208); |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
180 static const DicomTag DICOM_TAG_NUMBER_OF_SERIES_RELATED_INSTANCES(0x0020, 0x1209); |
e018037d4d0e
Support of optional tags for counting resources in C-Find
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1850
diff
changeset
|
181 static const DicomTag DICOM_TAG_SOP_CLASSES_IN_STUDY(0x0008, 0x0062); |
0 | 182 } |