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) More...
#include <gdcmTag.h>
Public Member Functions | |
Tag (uint16_t group, uint16_t element) | |
Constructor with 2*uint16_t. | |
Tag (uint32_t tag=0) | |
Constructor with 1*uint32_t Prefer the cstor that takes two uint16_t. | |
Tag (const Tag &_val) | |
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 |
bool | IsPublic () const |
bool | operator!= (const Tag &_val) const |
bool | operator< (const Tag &_val) const |
bool | operator<= (const Tag &t2) const |
Tag & | operator= (const Tag &_val) |
bool | operator== (const Tag &_val) const |
const uint16_t & | operator[] (const unsigned int &_id) const |
Returns the Group or Element of the given Tag, depending on id (0/1) | |
uint16_t & | operator[] (const unsigned int &_id) |
Returns the Group or Element of the given Tag, depending on id (0/1) | |
std::string | PrintAsPipeSeparatedString () 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 (uint16_t group, uint16_t element) |
Sets the 'Group number' & 'Element number' of the given Tag. | |
void | SetElementTag (uint32_t tag) |
Sets the full tag value 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: | |
template<typename TSwap > | |
const std::ostream & | Write (std::ostream &os) const |
Write a tag in binary rep. | |
Friends | |
std::ostream & | operator<< (std::ostream &_os, const Tag &_val) |
std::istream & | operator>> (std::istream &_is, Tag &_val) |
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)
ChangeSequenceUltrasound.cxx, ClinicalTrialAnnotate.cxx, CreateARGBImage.cxx, CreateCMYKImage.cxx, csa2img.cxx, DumpToSQLITE3.cxx, DuplicatePCDE.cxx, EncapsulateFileInRawData.cxx, ExtractEncryptedContent.cxx, FixBrokenJ2K.cxx, gdcmrtionplan.cxx, gdcmrtplan.cxx, GenAllVR.cxx, GenFakeIdentifyFile.cxx, GenFakeImage.cxx, GenSeqs.cxx, GetJPEGSamplePrecision.cxx, GetSequenceUltrasound.cxx, LargeVRDSExplicit.cxx, MergeTwoFiles.cxx, PatchFile.cxx, PublicDict.cxx, ReadAndDumpDICOMDIR.cxx, ReadExplicitLengthSQIVR.cxx, rle2img.cxx, SimpleScanner.cxx, SortImage.cxx, TraverseModules.cxx, and VolumeSorter.cxx.
gdcm::Tag::Tag | ( | uint16_t | group, |
uint16_t | element | ||
) | [inline] |
Constructor with 2*uint16_t.
gdcm::Tag::Tag | ( | uint32_t | tag = 0 ) |
[inline] |
Constructor with 1*uint32_t Prefer the cstor that takes two uint16_t.
uint16_t gdcm::Tag::GetElement | ( | ) | const [inline] |
Returns the 'Element number' of the given Tag.
Referenced by gdcm::DataSet::ComputeGroupLength(), IsGroupXX(), gdcm::PrivateDict::PrintXML(), and SetPrivateCreator().
uint32_t gdcm::Tag::GetElementTag | ( | ) | const [inline] |
Returns the full tag value of the given Tag.
uint16_t gdcm::Tag::GetGroup | ( | ) | const [inline] |
Returns the 'Group number' of the given Tag.
Referenced by gdcm::DataSet::ComputeGroupLength(), gdcm::FileMetaInformation::Insert(), gdcm::DataSet::Insert(), IsGroupXX(), gdcm::PrivateDict::PrintXML(), gdcm::Attribute< Group, Element, TVR, VM::VM1_n >::SetFromDataElement(), and gdcm::Attribute< Group, Element, TVR, TVM >::SetFromDataElement().
uint32_t gdcm::Tag::GetLength | ( | ) | const [inline] |
return the length of tag (read: size on disk)
Tag gdcm::Tag::GetPrivateCreator | ( | ) | const [inline] |
Return the Private Creator Data Element tag of a private data element.
References SetElement().
bool gdcm::Tag::IsGroupLength | ( | ) | const [inline] |
return whether the tag correspond to a group length tag:
bool gdcm::Tag::IsGroupXX | ( | const Tag & | t ) | const [inline] |
e.g 6002,3000 belong to groupXX: 6000,3000
References GetElement(), GetGroup(), and IsPrivate().
bool gdcm::Tag::IsIllegal | ( | ) | const [inline] |
return if the tag is considered to be an illegal tag
bool gdcm::Tag::IsPrivate | ( | ) | const [inline] |
PRIVATE DATA ELEMENT: Additional Data Element, defined by an implementor, to communicate information that is not contained in Standard Data Elements. Private Data elements have odd Group Numbers.
Referenced by IsGroupXX(), and SetPrivateCreator().
bool gdcm::Tag::IsPrivateCreator | ( | ) | const [inline] |
Returns if tag is a Private Creator (xxxx,00yy), where xxxx is odd number and yy in [0x10,0xFF]
bool gdcm::Tag::IsPublic | ( | ) | const [inline] |
bool gdcm::Tag::operator< | ( | const Tag & | _val ) | const [inline] |
bool gdcm::Tag::operator<= | ( | const Tag & | t2 ) | const [inline] |
const uint16_t& gdcm::Tag::operator[] | ( | const unsigned int & | _id ) | const [inline] |
uint16_t& gdcm::Tag::operator[] | ( | const unsigned int & | _id ) | [inline] |
std::string gdcm::Tag::PrintAsPipeSeparatedString | ( | ) | const |
Print as a pipe separated string (GDCM 1.x compat only). Do not use in newer code
std::istream& gdcm::Tag::Read | ( | std::istream & | is ) | [inline] |
Read a tag from binary representation.
bool gdcm::Tag::ReadFromCommaSeparatedString | ( | const char * | str ) |
Read from a comma separated string. This is a highly user oriented function, the string should be formated as: 1234,5678 to specify the tag (0x1234,0x5678) The notation comes from the DICOM standard, and is handy to use from a command line program
Reimplemented in gdcm::PrivateTag.
bool gdcm::Tag::ReadFromPipeSeparatedString | ( | const char * | str ) |
Read from a pipe separated string (GDCM 1.x compat only). Do not use in newer code
void gdcm::Tag::SetElement | ( | uint16_t | element ) | [inline] |
Sets the 'Element number' of the given Tag.
Referenced by GetPrivateCreator(), and gdcm::operator>>().
void gdcm::Tag::SetElementTag | ( | uint32_t | tag ) | [inline] |
Sets the full tag value of the given Tag.
void gdcm::Tag::SetElementTag | ( | uint16_t | group, |
uint16_t | element | ||
) | [inline] |
Sets the 'Group number' & 'Element number' of the given Tag.
void gdcm::Tag::SetGroup | ( | uint16_t | group ) | [inline] |
Sets the 'Group number' of the given Tag.
Referenced by gdcm::operator>>().
void gdcm::Tag::SetPrivateCreator | ( | Tag const & | t ) | [inline] |
Set private creator:
References GetElement(), and IsPrivate().
const std::ostream& gdcm::Tag::Write | ( | std::ostream & | os ) | const [inline] |
Write a tag in binary rep.
Referenced by gdcm::SequenceOfItems::Write(), gdcm::SequenceOfFragments::Write(), and gdcm::Item::Write().
std::ostream& operator<< | ( | std::ostream & | _os, |
const Tag & | _val | ||
) | [friend] |
std::istream& operator>> | ( | std::istream & | _is, |
Tag & | _val | ||
) | [friend] |
char gdcm::Tag::bytes[4] |
uint32_t gdcm::Tag::tag |
Referenced by operator!=(), operator<(), operator=(), operator==(), and Tag().
uint16_t gdcm::Tag::tags[2] |
Referenced by operator<().