Logo Search packages:      
Sourcecode: gdcm version File versions

gdcm::Tag Class Reference

#include <gdcmTag.h>

Inheritance diagram for gdcm::Tag:

gdcm::PrivateTag

List of all members.


Detailed Description

Class to represent a DICOM Data Element (Attribute) Tag (Group, Element). Basically an uint32_t which can also be expressed as two uint16_t (group and element).

Note:
DATA ELEMENT TAG: A unique identifier for a Data Element composed of an ordered pair of numbers (a Group Number followed by an Element Number). GROUP NUMBER: The first number in the ordered pair of numbers that makes up a Data Element Tag. ELEMENT NUMBER: The second number in the ordered pair of numbers that makes up a Data Element Tag.

Definition at line 38 of file gdcmTag.h.


Public Member Functions

uint16_t GetElement () const
 Returns the 'Element number' of the given Tag.
uint32_t GetElementTag () const
 Returns the full tag value of the given Tag.
uint16_t GetGroup () const
 Returns the 'Group number' of the given Tag.
uint32_t GetLength () const
 return the length of tag (read: size on disk)
Tag GetPrivateCreator () const
 Return the Private Creator Data Element tag of a private data element.
bool IsGroupLength () const
 return whether the tag correspond to a group length tag:
bool IsGroupXX (const Tag &t) const
 e.g 6002,3000 belong to groupXX: 6000,3000
bool IsIllegal () const
 return if the tag is considered to be an illegal tag
bool IsPrivate () const
bool IsPrivateCreator () const
 Returns if tag is a Private Creator (xxxx,00yy), where xxxx is odd number and yy in [0x10,0xFF].
bool IsPublic () const
bool operator!= (const Tag &_val) const
bool operator< (const Tag &_val) const
bool operator<= (const Tag &t2) const
Tagoperator= (const Tag &_val)
bool operator== (const Tag &_val) const
const uint16_t & operator[] (const unsigned int &_id)
const uint16_t & operator[] (const unsigned int &_id) const
template<typename TSwap>
std::istream & Read (std::istream &is)
 Read a tag from binary representation.
bool ReadFromCommaSeparatedString (const char *str)
bool ReadFromPipeSeparatedString (const char *str)
void SetElement (uint16_t element)
 Sets the 'Element number' of the given Tag.
void SetElementTag (uint32_t tag)
 Sets the full tag value of the given Tag.
void SetElementTag (uint16_t group, uint16_t element)
 Sets the 'Group number' & 'Element number' of the given Tag.
void SetGroup (uint16_t group)
 Sets the 'Group number' of the given Tag.
void SetPrivateCreator (Tag const &t)
 Set private creator:.
 Tag (const Tag &_val)
 Tag (uint32_t tag=0)
 Constructor with 1*uint32_t Prefer the cstor that takes two uint16_t.
 Tag (uint16_t group, uint16_t element)
 Constructor with 2*uint16_t.
template<typename TSwap>
const std::ostream & Write (std::ostream &os) const
 Write a tag in binary rep.

Private Attributes

union {
   char   bytes [4]
   uint32_t   tag
   uint16_t   tags [2]
ElementTag

Friends

std::ostream & operator<< (std::ostream &_os, const Tag &_val)

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

Generated by  Doxygen 1.6.0   Back to index