Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkDICOMTag.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkDICOMTag_h
14 #define mitkDICOMTag_h
15 
16 #include "mitkPoint.h"
17 #include "mitkVector.h"
18 
19 #include "MitkDICOMExports.h"
20 
21 namespace mitk
22 {
23 
33 {
34  public:
35 
36  DICOMTag(unsigned int group, unsigned int element);
37  DICOMTag(const DICOMTag& other);
38  DICOMTag& operator=(const DICOMTag& other);
39  bool operator==(const DICOMTag& other) const;
40  bool operator<(const DICOMTag& other) const;
41 
42  unsigned int GetGroup() const;
43  unsigned int GetElement() const;
44 
46  std::string GetName() const;
47 
49  void Print(std::ostream& os) const;
50 
51  private:
52 
53  std::string toHexString(unsigned int i) const;
54 
55  unsigned int m_Group;
56  unsigned int m_Element;
57 };
58 
59 typedef std::vector<DICOMTag> DICOMTagList;
60 
69 void DICOMStringToOrientationVectors(const std::string& s, Vector3D& right, Vector3D& up, bool& successful);
70 
71 bool DICOMStringToSpacing(const std::string& s, ScalarType& spacingX, ScalarType& spacingY);
72 
73 
82 Point3D DICOMStringToPoint3D(const std::string& s, bool& successful);
83 
84 }
85 
86 #endif
#define MITKDICOM_EXPORT
Representation of a DICOM tag.
Definition: mitkDICOMTag.h:33
std::string GetName() const
Return the name of this tag (e.g. "SeriesDescription" instead of "(0008,103e)")
unsigned int GetElement() const
void Print(std::ostream &os) const
add "(group-id,element-id) name" to given stream
DICOMTag(const DICOMTag &other)
DICOMTag(unsigned int group, unsigned int element)
unsigned int GetGroup() const
bool operator<(const DICOMTag &other) const
DICOMTag & operator=(const DICOMTag &other)
bool operator==(const DICOMTag &other) const
Find image slices visible on a given plane.
bool DICOMStringToSpacing(const std::string &s, ScalarType &spacingX, ScalarType &spacingY)
std::vector< DICOMTag > DICOMTagList
Definition: mitkDICOMTag.h:59
void DICOMStringToOrientationVectors(const std::string &s, Vector3D &right, Vector3D &up, bool &successful)
Convert DICOM string describing a point two Vector3D.
Point3D DICOMStringToPoint3D(const std::string &s, bool &successful)
Convert DICOM string describing a point to Point3D.
double ScalarType