Mercurial > hg > orthanc
annotate Core/DicomFormat/DicomTag.h @ 264:5b8e8b74bc8b
remove files only after the sqlite transaction has succeeded
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Dec 2012 13:18:59 +0100 |
parents | fe180eae201d |
children | 4d7469f72a0b |
rev | line source |
---|---|
0 | 1 /** |
59 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
0 | 3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege, |
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> | |
36 #include <stdint.h> | |
37 | |
38 | |
59 | 39 namespace Orthanc |
0 | 40 { |
41 class DicomTag | |
42 { | |
43 // This must stay a POD (plain old data structure) | |
44 | |
45 private: | |
46 uint16_t group_; | |
47 uint16_t element_; | |
48 | |
49 public: | |
50 DicomTag(uint16_t group, | |
51 uint16_t element) : | |
52 group_(group), | |
53 element_(element) | |
54 { | |
55 } | |
56 | |
57 uint16_t GetGroup() const | |
58 { | |
59 return group_; | |
60 } | |
61 | |
62 uint16_t GetElement() const | |
63 { | |
64 return element_; | |
65 } | |
66 | |
67 bool operator< (const DicomTag& other) const; | |
68 | |
106 | 69 bool operator== (const DicomTag& other) const |
70 { | |
71 return group_ == other.group_ && element_ == other.element_; | |
72 } | |
73 | |
74 bool operator!= (const DicomTag& other) const | |
75 { | |
76 return !(*this == other); | |
77 } | |
78 | |
35
f6d12037f886
full json vs. simplified json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
79 std::string Format() const; |
f6d12037f886
full json vs. simplified json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
80 |
0 | 81 friend std::ostream& operator<< (std::ostream& o, const DicomTag& tag); |
80 | 82 }; |
77 | 83 |
80 | 84 // Aliases for the most useful tags |
85 static const DicomTag DICOM_TAG_ACCESSION_NUMBER(0x0008, 0x0050); | |
86 static const DicomTag DICOM_TAG_SOP_INSTANCE_UID(0x0008, 0x0018); | |
87 static const DicomTag DICOM_TAG_PATIENT_ID(0x0010, 0x0020); | |
88 static const DicomTag DICOM_TAG_SERIES_INSTANCE_UID(0x0020, 0x000e); | |
89 static const DicomTag DICOM_TAG_STUDY_INSTANCE_UID(0x0020, 0x000d); | |
90 static const DicomTag DICOM_TAG_PIXEL_DATA(0x7fe0, 0x0010); | |
77 | 91 |
80 | 92 static const DicomTag DICOM_TAG_IMAGE_INDEX(0x0054, 0x1330); |
93 static const DicomTag DICOM_TAG_INSTANCE_NUMBER(0x0020, 0x0013); | |
94 | |
95 static const DicomTag DICOM_TAG_NUMBER_OF_SLICES(0x0054, 0x0081); | |
96 static const DicomTag DICOM_TAG_NUMBER_OF_FRAMES(0x0028, 0x0008); | |
97 static const DicomTag DICOM_TAG_CARDIAC_NUMBER_OF_IMAGES(0x0018, 0x1090); | |
98 static const DicomTag DICOM_TAG_IMAGES_IN_ACQUISITION(0x0020, 0x1002); | |
106 | 99 |
100 static const DicomTag DICOM_TAG_PATIENT_NAME(0x0010, 0x0010); | |
0 | 101 } |