Mercurial > hg > orthanc
annotate Core/DicomFormat/DicomTag.h @ 996:cf52f3bcb2b3 lua-scripting
clarification of Lua classes wrt multithreading
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 03 Jul 2014 16:27:16 +0200 |
parents | e53a7e30a137 |
children | 1ea4094d077c |
rev | line source |
---|---|
0 | 1 /** |
59 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
689 | 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege, |
0 | 4 * Belgium |
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 | |
291
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
136
diff
changeset
|
69 const char* GetMainTagsName() const; |
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
136
diff
changeset
|
70 |
0 | 71 bool operator< (const DicomTag& other) const; |
72 | |
106 | 73 bool operator== (const DicomTag& other) const |
74 { | |
75 return group_ == other.group_ && element_ == other.element_; | |
76 } | |
77 | |
78 bool operator!= (const DicomTag& other) const | |
79 { | |
80 return !(*this == other); | |
81 } | |
82 | |
35
f6d12037f886
full json vs. simplified json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
83 std::string Format() const; |
f6d12037f886
full json vs. simplified json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
84 |
0 | 85 friend std::ostream& operator<< (std::ostream& o, const DicomTag& tag); |
961 | 86 |
87 static void GetTagsForModule(std::set<DicomTag>& target, | |
88 ResourceType module); | |
80 | 89 }; |
77 | 90 |
80 | 91 // Aliases for the most useful tags |
92 static const DicomTag DICOM_TAG_ACCESSION_NUMBER(0x0008, 0x0050); | |
93 static const DicomTag DICOM_TAG_SOP_INSTANCE_UID(0x0008, 0x0018); | |
94 static const DicomTag DICOM_TAG_PATIENT_ID(0x0010, 0x0020); | |
95 static const DicomTag DICOM_TAG_SERIES_INSTANCE_UID(0x0020, 0x000e); | |
96 static const DicomTag DICOM_TAG_STUDY_INSTANCE_UID(0x0020, 0x000d); | |
97 static const DicomTag DICOM_TAG_PIXEL_DATA(0x7fe0, 0x0010); | |
77 | 98 |
80 | 99 static const DicomTag DICOM_TAG_IMAGE_INDEX(0x0054, 0x1330); |
100 static const DicomTag DICOM_TAG_INSTANCE_NUMBER(0x0020, 0x0013); | |
101 | |
102 static const DicomTag DICOM_TAG_NUMBER_OF_SLICES(0x0054, 0x0081); | |
433 | 103 static const DicomTag DICOM_TAG_NUMBER_OF_TIME_SLICES(0x0054, 0x0101); |
80 | 104 static const DicomTag DICOM_TAG_NUMBER_OF_FRAMES(0x0028, 0x0008); |
105 static const DicomTag DICOM_TAG_CARDIAC_NUMBER_OF_IMAGES(0x0018, 0x1090); | |
106 static const DicomTag DICOM_TAG_IMAGES_IN_ACQUISITION(0x0020, 0x1002); | |
106 | 107 |
108 static const DicomTag DICOM_TAG_PATIENT_NAME(0x0010, 0x0010); | |
303
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
109 |
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
110 // The following is used for "modify" operations |
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
111 static const DicomTag DICOM_TAG_SOP_CLASS_UID(0x0008, 0x0016); |
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
112 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
|
113 static const DicomTag DICOM_TAG_MEDIA_STORAGE_SOP_INSTANCE_UID(0x0002, 0x0003); |
433 | 114 |
441 | 115 // DICOM tags used for fMRI (thanks to Will Ryder) |
433 | 116 static const DicomTag DICOM_TAG_NUMBER_OF_TEMPORAL_POSITIONS(0x0020, 0x0105); |
117 static const DicomTag DICOM_TAG_TEMPORAL_POSITION_IDENTIFIER(0x0020, 0x0100); | |
559 | 118 |
119 // Tags for C-FIND and C-MOVE | |
120 static const DicomTag DICOM_TAG_SPECIFIC_CHARACTER_SET(0x0008, 0x0005); | |
121 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
|
122 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
|
123 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
124 // Tags for images |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
125 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
|
126 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
|
127 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
|
128 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
|
129 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
|
130 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
|
131 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
|
132 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
|
133 static const DicomTag DICOM_TAG_PHOTOMETRIC_INTERPRETATION(0x0028, 0x0004); |
0 | 134 } |