GDCM_NAME_SPACE::TagKey Class Reference

#include <gdcmTagKey.h>

List of all members.

Public Member Functions

 TagKey (uint16_t group, uint16_t elem)
 TagKey ()
std::string str () const
void SetGroup (uint16_t group)
 sets the Group Number for the TagKey
uint16_t GetGroup () const
void SetElement (uint16_t elem)
 sets the Element Number for the TagKey
uint16_t GetElement () const
void SetGroupElem (uint16_t group, uint16_t elem)
 sets the Group Number and Element Number for the TagKey
TagKeyoperator= (const TagKey &_val)
 TagKey (const TagKey &_val)
const uint16_t & operator[] (const unsigned int &_id) const
const uint16_t & operator[] (const unsigned int &_id)
bool operator== (const TagKey &_val) const
bool operator!= (const TagKey &_val) const
bool operator< (const TagKey &_val) const

Private Attributes

uint16_t tag [2]

Friends

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


Detailed Description

Definition at line 32 of file gdcmTagKey.h.


Constructor & Destructor Documentation

GDCM_NAME_SPACE::TagKey::TagKey uint16_t  group,
uint16_t  elem
[inline]
 

Definition at line 35 of file gdcmTagKey.h.

References tag.

00035 { tag[0] = group;tag[1] = elem;}

GDCM_NAME_SPACE::TagKey::TagKey  )  [inline]
 

Definition at line 36 of file gdcmTagKey.h.

References tag.

00036 { tag[0] = tag[1] = 0x0000;}

GDCM_NAME_SPACE::TagKey::TagKey const TagKey _val  )  [inline]
 

Definition at line 65 of file gdcmTagKey.h.

References tag.

00066    {
00067      tag[0] = _val[0];
00068      tag[1] = _val[1];
00069    }


Member Function Documentation

uint16_t GDCM_NAME_SPACE::TagKey::GetElement  )  const [inline]
 

Definition at line 52 of file gdcmTagKey.h.

References tag.

Referenced by GDCM_NAME_SPACE::File::GetTSize().

00052 { return tag[1]; }

uint16_t GDCM_NAME_SPACE::TagKey::GetGroup  )  const [inline]
 

Definition at line 48 of file gdcmTagKey.h.

References tag.

Referenced by GDCM_NAME_SPACE::File::GetTSize().

00048 { return tag[0]; }

bool GDCM_NAME_SPACE::TagKey::operator!= const TagKey _val  )  const [inline]
 

Definition at line 87 of file gdcmTagKey.h.

References tag.

00088    {
00089       return tag[0] != _val.tag[0] || tag[1] != _val.tag[1];
00090    }

bool GDCM_NAME_SPACE::TagKey::operator< const TagKey _val  )  const [inline]
 

Definition at line 92 of file gdcmTagKey.h.

References tag.

00093    {
00094       return tag[0] < _val.tag[0] 
00095         || (tag[0] == _val.tag[0] && tag[1] < _val.tag[1]);
00096    }

TagKey& GDCM_NAME_SPACE::TagKey::operator= const TagKey _val  )  [inline]
 

Definition at line 58 of file gdcmTagKey.h.

References tag.

00059    {
00060       tag[0] = _val.tag[0];
00061       tag[1] = _val.tag[1];
00062       return *this;
00063    }

bool GDCM_NAME_SPACE::TagKey::operator== const TagKey _val  )  const [inline]
 

Definition at line 82 of file gdcmTagKey.h.

References tag.

00083    {
00084       return tag[0] == _val.tag[0] && tag[1] == _val.tag[1];
00085    }

const uint16_t& GDCM_NAME_SPACE::TagKey::operator[] const unsigned int &  _id  )  [inline]
 

Definition at line 76 of file gdcmTagKey.h.

References tag.

00077    {
00078       assert(_id<2);
00079       return tag[_id];
00080    }

const uint16_t& GDCM_NAME_SPACE::TagKey::operator[] const unsigned int &  _id  )  const [inline]
 

Definition at line 71 of file gdcmTagKey.h.

References tag.

00072    {
00073       assert(_id<2);
00074       return tag[_id];
00075    }

void GDCM_NAME_SPACE::TagKey::SetElement uint16_t  elem  )  [inline]
 

sets the Element Number for the TagKey

Definition at line 51 of file gdcmTagKey.h.

References tag.

Referenced by GDCM_NAME_SPACE::DictEntry::DictEntry().

00051 { tag[1] = elem; }   

void GDCM_NAME_SPACE::TagKey::SetGroup uint16_t  group  )  [inline]
 

sets the Group Number for the TagKey

Definition at line 47 of file gdcmTagKey.h.

References tag.

Referenced by GDCM_NAME_SPACE::DictEntry::DictEntry().

00047 { tag[0] = group; }

void GDCM_NAME_SPACE::TagKey::SetGroupElem uint16_t  group,
uint16_t  elem
[inline]
 

sets the Group Number and Element Number for the TagKey

Definition at line 55 of file gdcmTagKey.h.

References tag.

Referenced by GDCM_NAME_SPACE::DocEntry::DocEntry().

00056                                { tag[0] = group;tag[1] = elem; }

std::string GDCM_NAME_SPACE::TagKey::str  )  const [inline]
 

Definition at line 40 of file gdcmTagKey.h.

References tag.

00041    {
00042       char res[10];
00043       sprintf(res,"%04x|%04x",tag[0],tag[1]);
00044       return std::string(res);
00045    }


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  _os,
const TagKey _val
[friend]
 

Definition at line 103 of file gdcmTagKey.h.

00104 {
00105    _os.setf( std::ios::right);
00106    _os << std::hex << std::setw( 4 ) << std::setfill( '0' )
00107        << _val.tag[0] << '|' << std::setw( 4 ) << std::setfill( '0' )
00108        << _val.tag[1] << std::setfill( ' ' ) << std::dec;
00109    return _os;
00110 }


Member Data Documentation

uint16_t GDCM_NAME_SPACE::TagKey::tag[2] [private]
 

Definition at line 99 of file gdcmTagKey.h.

Referenced by GetElement(), GetGroup(), operator!=(), operator<(), GDCM_NAME_SPACE::operator<<(), operator=(), operator==(), operator[](), SetElement(), SetGroup(), SetGroupElem(), str(), and TagKey().


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 13:01:57 2007 for gdcm by  doxygen 1.4.6