Mercurial > hg > orthanc
annotate OrthancFramework/Sources/DicomFormat/DicomElement.cpp @ 4845:02d77189d8ba received-instance-callback
added ReceivedInstanceCallback + sample C++ plugin
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 09 Dec 2021 17:22:40 +0100 |
parents | 7053502fbf97 |
children | 43e613a7756b |
rev | line source |
---|---|
4297 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
4437
d9473bd5ed43
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4297
diff
changeset
|
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium |
4831
7053502fbf97
added copyright UCLouvain
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
6 * Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
4297 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU Lesser General Public License | |
10 * as published by the Free Software Foundation, either version 3 of | |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Lesser General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Lesser General Public | |
19 * License along with this program. If not, see | |
20 * <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 | |
24 #include "../PrecompiledHeaders.h" | |
25 #include "DicomElement.h" | |
26 | |
27 | |
28 namespace Orthanc | |
29 { | |
30 DicomElement::DicomElement(uint16_t group, | |
31 uint16_t element, | |
32 const DicomValue &value) : | |
33 tag_(group, element), | |
34 value_(value.Clone()) | |
35 { | |
36 } | |
37 | |
38 DicomElement::DicomElement(const DicomTag &tag, | |
39 const DicomValue &value) : | |
40 tag_(tag), | |
41 value_(value.Clone()) | |
42 { | |
43 } | |
44 | |
45 DicomElement::~DicomElement() | |
46 { | |
47 delete value_; | |
48 } | |
49 | |
50 const DicomTag &DicomElement::GetTag() const | |
51 { | |
52 return tag_; | |
53 } | |
54 | |
55 const DicomValue &DicomElement::GetValue() const | |
56 { | |
57 return *value_; | |
58 } | |
59 | |
60 uint16_t DicomElement::GetTagGroup() const | |
61 { | |
62 return tag_.GetGroup(); | |
63 } | |
64 | |
65 uint16_t DicomElement::GetTagElement() const | |
66 { | |
67 return tag_.GetElement(); | |
68 } | |
69 | |
70 bool DicomElement::operator<(const DicomElement &other) const | |
71 { | |
72 return GetTag() < other.GetTag(); | |
73 } | |
74 } |