comparison Core/DicomFormat/DicomTag.h @ 0:3959d33612cc

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 19 Jul 2012 14:32:22 +0200
parents
children f6d12037f886
comparison
equal deleted inserted replaced
-1:000000000000 0:3959d33612cc
1 /**
2 * Palantir - A Lightweight, RESTful DICOM Store
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.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 **/
19
20
21 #pragma once
22
23 #include <string>
24 #include <stdint.h>
25
26
27 namespace Palantir
28 {
29 class DicomTag
30 {
31 // This must stay a POD (plain old data structure)
32
33 private:
34 uint16_t group_;
35 uint16_t element_;
36
37 public:
38 DicomTag(uint16_t group,
39 uint16_t element) :
40 group_(group),
41 element_(element)
42 {
43 }
44
45 uint16_t GetGroup() const
46 {
47 return group_;
48 }
49
50 uint16_t GetElement() const
51 {
52 return element_;
53 }
54
55 bool operator< (const DicomTag& other) const;
56
57 friend std::ostream& operator<< (std::ostream& o, const DicomTag& tag);
58
59 // Alias for the most useful tags
60 static const DicomTag ACCESSION_NUMBER;
61 static const DicomTag IMAGE_INDEX;
62 static const DicomTag INSTANCE_UID;
63 static const DicomTag NUMBER_OF_SLICES;
64 static const DicomTag PATIENT_ID;
65 static const DicomTag SERIES_UID;
66 static const DicomTag STUDY_UID;
67 static const DicomTag PIXEL_DATA;
68 };
69 }