Mercurial > hg > orthanc
annotate Core/DicomFormat/DicomTag.h @ 656:08eca5d86aad
fixes to cppcheck
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 04 Nov 2013 11:19:31 +0100 |
parents | 9924aec1d694 |
children | 3bdb5db8e839 2d0a347e8cfc |
rev | line source |
---|---|
0 | 1 /** |
59 | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
398 | 3 * Copyright (C) 2012-2013 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> | |
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 | |
291
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
136
diff
changeset
|
67 const char* GetMainTagsName() const; |
4d7469f72a0b
embedding of dicom dictionaries
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
136
diff
changeset
|
68 |
0 | 69 bool operator< (const DicomTag& other) const; |
70 | |
106 | 71 bool operator== (const DicomTag& other) const |
72 { | |
73 return group_ == other.group_ && element_ == other.element_; | |
74 } | |
75 | |
76 bool operator!= (const DicomTag& other) const | |
77 { | |
78 return !(*this == other); | |
79 } | |
80 | |
35
f6d12037f886
full json vs. simplified json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
81 std::string Format() const; |
f6d12037f886
full json vs. simplified json
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
0
diff
changeset
|
82 |
0 | 83 friend std::ostream& operator<< (std::ostream& o, const DicomTag& tag); |
80 | 84 }; |
77 | 85 |
80 | 86 // Aliases for the most useful tags |
87 static const DicomTag DICOM_TAG_ACCESSION_NUMBER(0x0008, 0x0050); | |
88 static const DicomTag DICOM_TAG_SOP_INSTANCE_UID(0x0008, 0x0018); | |
89 static const DicomTag DICOM_TAG_PATIENT_ID(0x0010, 0x0020); | |
90 static const DicomTag DICOM_TAG_SERIES_INSTANCE_UID(0x0020, 0x000e); | |
91 static const DicomTag DICOM_TAG_STUDY_INSTANCE_UID(0x0020, 0x000d); | |
92 static const DicomTag DICOM_TAG_PIXEL_DATA(0x7fe0, 0x0010); | |
77 | 93 |
80 | 94 static const DicomTag DICOM_TAG_IMAGE_INDEX(0x0054, 0x1330); |
95 static const DicomTag DICOM_TAG_INSTANCE_NUMBER(0x0020, 0x0013); | |
96 | |
97 static const DicomTag DICOM_TAG_NUMBER_OF_SLICES(0x0054, 0x0081); | |
433 | 98 static const DicomTag DICOM_TAG_NUMBER_OF_TIME_SLICES(0x0054, 0x0101); |
80 | 99 static const DicomTag DICOM_TAG_NUMBER_OF_FRAMES(0x0028, 0x0008); |
100 static const DicomTag DICOM_TAG_CARDIAC_NUMBER_OF_IMAGES(0x0018, 0x1090); | |
101 static const DicomTag DICOM_TAG_IMAGES_IN_ACQUISITION(0x0020, 0x1002); | |
106 | 102 |
103 static const DicomTag DICOM_TAG_PATIENT_NAME(0x0010, 0x0010); | |
303
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
104 |
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
105 // The following is used for "modify" operations |
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
106 static const DicomTag DICOM_TAG_SOP_CLASS_UID(0x0008, 0x0016); |
c76a35a85c69
ready for anonymization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
291
diff
changeset
|
107 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
|
108 static const DicomTag DICOM_TAG_MEDIA_STORAGE_SOP_INSTANCE_UID(0x0002, 0x0003); |
433 | 109 |
441 | 110 // DICOM tags used for fMRI (thanks to Will Ryder) |
433 | 111 static const DicomTag DICOM_TAG_NUMBER_OF_TEMPORAL_POSITIONS(0x0020, 0x0105); |
112 static const DicomTag DICOM_TAG_TEMPORAL_POSITION_IDENTIFIER(0x0020, 0x0100); | |
559 | 113 |
114 // Tags for C-FIND and C-MOVE | |
115 static const DicomTag DICOM_TAG_SPECIFIC_CHARACTER_SET(0x0008, 0x0005); | |
116 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
|
117 static const DicomTag DICOM_TAG_MODALITIES_IN_STUDY(0x0008, 0x0061); |
0 | 118 } |