Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::DICOMTag Class Reference

Representation of a DICOM tag. More...

#include <mitkDICOMTag.h>

Public Member Functions

 DICOMTag (unsigned int group, unsigned int element)
 Construct a DICOMTag from group and element numbers. More...
 
 DICOMTag (const DICOMTag &other)
 Copy constructor. More...
 
DICOMTag & operator= (const DICOMTag &other)
 Assignment operator. More...
 
bool operator== (const DICOMTag &other) const
 Equality comparison operator. More...
 
bool operator< (const DICOMTag &other) const
 Less-than comparison operator (for sorting/containers). More...
 
unsigned int GetGroup () const
 Get the DICOM group number. More...
 
unsigned int GetElement () const
 Get the DICOM element number. More...
 
std::string GetName () const
 Return the name of this tag (e.g. "SeriesDescription" instead of "(0008,103e)"). More...
 
void Print (std::ostream &os) const
 Print "(group-id,element-id) name" to the given stream. More...
 

Detailed Description

Representation of a DICOM tag.

This class is just meant to combine group and element numbers for better readability and make handling tags more easy by offering comparison methods.

Definition at line 32 of file mitkDICOMTag.h.

Constructor & Destructor Documentation

◆ DICOMTag() [1/2]

mitk::DICOMTag::DICOMTag ( unsigned int  group,
unsigned int  element 
)

Construct a DICOMTag from group and element numbers.

Parameters
[in]groupThe DICOM tag group number (e.g. 0x0010).
[in]elementThe DICOM tag element number (e.g. 0x0010).

◆ DICOMTag() [2/2]

mitk::DICOMTag::DICOMTag ( const DICOMTag &  other)

Copy constructor.

Member Function Documentation

◆ GetElement()

unsigned int mitk::DICOMTag::GetElement ( ) const

Get the DICOM element number.

Returns
The element number.

◆ GetGroup()

unsigned int mitk::DICOMTag::GetGroup ( ) const

Get the DICOM group number.

Returns
The group number.

◆ GetName()

std::string mitk::DICOMTag::GetName ( ) const

Return the name of this tag (e.g. "SeriesDescription" instead of "(0008,103e)").

Returns
A human-readable tag name from the DICOM dictionary.

◆ operator<()

bool mitk::DICOMTag::operator< ( const DICOMTag &  other) const

Less-than comparison operator (for sorting/containers).

Parameters
[in]otherThe tag to compare with.
Returns
true if this tag is less than the other (group first, then element).

◆ operator=()

DICOMTag& mitk::DICOMTag::operator= ( const DICOMTag &  other)

Assignment operator.

◆ operator==()

bool mitk::DICOMTag::operator== ( const DICOMTag &  other) const

Equality comparison operator.

Parameters
[in]otherThe tag to compare with.
Returns
true if group and element are identical.

◆ Print()

void mitk::DICOMTag::Print ( std::ostream &  os) const

Print "(group-id,element-id) name" to the given stream.

Parameters
[in,out]osThe output stream to print to.

The documentation for this class was generated from the following file: