diff OrthancFramework/Sources/DicomFormat/DicomTag.cpp @ 4297:785a2713323e

abi continued
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 05 Nov 2020 17:20:49 +0100
parents 8e069a7e1c11
children 91554aecff9a
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomFormat/DicomTag.cpp	Thu Nov 05 15:52:28 2020 +0100
+++ b/OrthancFramework/Sources/DicomFormat/DicomTag.cpp	Thu Nov 05 17:20:49 2020 +0100
@@ -54,6 +54,28 @@
   }
 
 
+  DicomTag::DicomTag(uint16_t group, uint16_t element) :
+    group_(group),
+    element_(element)
+  {
+  }
+
+  uint16_t DicomTag::GetGroup() const
+  {
+    return group_;
+  }
+
+  uint16_t DicomTag::GetElement() const
+  {
+    return element_;
+  }
+
+  bool DicomTag::IsPrivate() const
+  {
+    return group_ % 2 == 1;
+  }
+
+
   bool DicomTag::operator< (const DicomTag& other) const
   {
     if (group_ < other.group_)
@@ -77,6 +99,26 @@
     return element_ <= other.element_;
   }
 
+  bool DicomTag::operator>(const DicomTag &other) const
+  {
+    return !(*this <= other);
+  }
+
+  bool DicomTag::operator>=(const DicomTag &other) const
+  {
+    return !(*this < other);
+  }
+
+  bool DicomTag::operator==(const DicomTag &other) const
+  {
+    return group_ == other.group_ && element_ == other.element_;
+  }
+
+  bool DicomTag::operator!=(const DicomTag &other) const
+  {
+    return !(*this == other);
+  }
+
 
   std::ostream& operator<< (std::ostream& o, const DicomTag& tag)
   {