Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

gdcm::TagKey Class Reference

#include <gdcmTagKey.h>

List of all members.

Public Member Functions

 TagKey (uint16_t gr, uint16_t elt)
 TagKey ()
std::string str () const
void SetGroup (uint16_t group)
uint16_t GetGroup () const
void SetElement (uint16_t elem)
uint16_t GetElement () const
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::TagKey::TagKey uint16_t  gr,
uint16_t  elt
[inline]
 

Definition at line 35 of file gdcmTagKey.h.

References tag.

00035 { tag[0] = gr;tag[1] = elt;}

gdcm::TagKey::TagKey  )  [inline]
 

Definition at line 36 of file gdcmTagKey.h.

References tag.

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

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

Definition at line 60 of file gdcmTagKey.h.

References tag.

00061    {
00062      tag[0] = _val[0];
00063      tag[1] = _val[1];
00064    }


Member Function Documentation

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

Definition at line 51 of file gdcmTagKey.h.

References tag.

00051 { return tag[1]; }

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

Definition at line 48 of file gdcmTagKey.h.

References tag.

00048 { return tag[0]; }

bool gdcm::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    }

bool gdcm::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] 
00090         || (tag[0] == _val.tag[0] && tag[1] < _val.tag[1]);
00091    }

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

Definition at line 53 of file gdcmTagKey.h.

References tag.

00054    {
00055       tag[0] = _val.tag[0];
00056       tag[1] = _val.tag[1];
00057       return *this;
00058    }

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

Definition at line 77 of file gdcmTagKey.h.

References tag.

00078    {
00079       return tag[0] == _val.tag[0] && tag[1] == _val.tag[1];
00080    }

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

Definition at line 71 of file gdcmTagKey.h.

References tag.

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

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

Definition at line 66 of file gdcmTagKey.h.

References tag.

00067    {
00068       assert(_id<2);
00069       return tag[_id];
00070    }

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

Definition at line 50 of file gdcmTagKey.h.

References tag.

Referenced by gdcm::DicomEntry::DicomEntry(), and gdcm::DictEntry::DictEntry().

00050 { tag[1] = elem; }

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

Definition at line 47 of file gdcmTagKey.h.

References tag.

Referenced by gdcm::DicomEntry::DicomEntry(), and gdcm::DictEntry::DictEntry().

00047 { tag[0] = group; }

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

Definition at line 40 of file gdcmTagKey.h.

References tag.

Referenced by gdcm::DicomDirElement::Print().

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 98 of file gdcmTagKey.h.

00099 {
00100    _os.setf( std::ios::right);
00101    _os << std::hex << std::setw( 4 ) << std::setfill( '0' )
00102        << _val.tag[0] << '|' << std::setw( 4 ) << std::setfill( '0' )
00103        << _val.tag[1] << std::setfill( ' ' ) << std::dec;
00104    return _os;
00105 }


Member Data Documentation

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

Definition at line 94 of file gdcmTagKey.h.

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


The documentation for this class was generated from the following file:
Generated on Fri Jan 20 10:14:38 2006 for gdcm by  doxygen 1.4.4