OFFIS DCMTK
Version 3.6.0
|
this class encapsulates an attribute tag (group, element) and a VR. More...
Public Member Functions | |
DcmTag () | |
default constructor | |
DcmTag (const DcmTagKey &akey) | |
constructor. More... | |
DcmTag (Uint16 g, Uint16 e) | |
constructor. More... | |
DcmTag (const DcmTagKey &akey, const DcmVR &avr) | |
constructor. More... | |
DcmTag (Uint16 g, Uint16 e, const DcmVR &avr) | |
constructor. More... | |
DcmTag (const DcmTag &tag) | |
copy constructor | |
~DcmTag () | |
destructor | |
DcmTag & | operator= (const DcmTag &tag) |
copy assignment operator | |
DcmVR | setVR (const DcmVR &avr) |
set specific VR | |
DcmVR | getVR () const |
returns VR object by value | |
DcmEVR | getEVR () const |
returns VR code | |
const char * | getVRName () const |
returns name of VR | |
Uint16 | getGTag () const |
returns tag group More... | |
Uint16 | getETag () const |
returns tag element More... | |
DcmTagKey | getXTag () const |
returns a copy of the tag key by value More... | |
const char * | getTagName () |
returns name of attribute tag. More... | |
const char * | getPrivateCreator () const |
returns the current private creator string for this object if any, NULL otherwise. More... | |
void | setPrivateCreator (const char *privCreator) |
assigns a private creator code and deletes a possibly cached attribute name since the attribute name could change if a different private creator code is used. More... | |
void | lookupVRinDictionary () |
performs a look-up of the VR for the current tag key in the dictionary, under consideration of the private creator (if defined). More... | |
OFBool | isSignable () const |
returns true if a data element with the given tag and VR can be digitally signed, false otherwise More... | |
OFBool | isUnknownVR () const |
returns true if the VR used for writing is "UN" | |
OFCondition | error () const |
returns current status flag | |
![]() | |
DcmTagKey () | |
default constructor | |
DcmTagKey (const DcmTagKey &key) | |
copy constructor More... | |
DcmTagKey (Uint16 g, Uint16 e) | |
constructor More... | |
virtual | ~DcmTagKey () |
destructor | |
void | set (const DcmTagKey &key) |
set value to given tag key More... | |
void | set (Uint16 g, Uint16 e) |
set value to given group and element More... | |
void | setGroup (Uint16 g) |
set group to given number More... | |
void | setElement (Uint16 e) |
set element to given number More... | |
Uint16 | getGroup () const |
returns group number More... | |
Uint16 | getElement () const |
returns element number More... | |
OFBool | isGroupLength () const |
checks whether the tag key is a valid group length element. More... | |
OFBool | isPrivate () const |
returns true if the tag key is private, ie. More... | |
OFBool | isPrivateReservation () const |
returns true, if tag is a private reservation tag of the form (gggg,00xx) with gggg being odd and xx in the range of 10 and FF. More... | |
OFBool | hasValidGroup () const |
returns true, if group is valid (permitted in DICOM files). More... | |
Uint32 | hash () const |
generate a simple hash code for this attribute tag, used for fast look-up in the DICOM dictionary More... | |
DcmTagKey & | operator= (const DcmTagKey &key) |
assignment operator for initializing this tag key from an existing one. More... | |
int | operator== (const DcmTagKey &key) const |
Comparison operator. More... | |
int | operator!= (const DcmTagKey &key) const |
negation operator. More... | |
int | operator< (const DcmTagKey &key) const |
'less than' operator. More... | |
int | operator> (const DcmTagKey &key) const |
'greater than' operator. More... | |
int | operator<= (const DcmTagKey &key) const |
'less or equal' operator. More... | |
int | operator>= (const DcmTagKey &key) const |
'greater or equal' operator. More... | |
OFString | toString () const |
convert tag key to string having the form "(gggg,eeee)". More... | |
OFBool | isSignableTag () const |
returns true if a data element with the given tag key can be digitally signed, false otherwise More... | |
Static Public Member Functions | |
static OFCondition | findTagFromName (const char *name, DcmTag &value) |
convert the given string to a DICOM tag value More... | |
Private Member Functions | |
void | updateTagName (const char *c) |
replace tagName with copy of given string More... | |
void | updatePrivateCreator (const char *c) |
replace privateCreator with copy of given string More... | |
Private Attributes | |
DcmVR | vr |
VR of this attribute tag. | |
char * | tagName |
name of this attribute tag, remains NULL unless getTagName() is called | |
char * | privateCreator |
private creator code, remains NULL unless setPrivateCreator() is called | |
OFCondition | errorFlag |
current error code, EC_Normal if a valid VR for the tag is known | |
Additional Inherited Members | |
![]() | |
int | groupLT (const DcmTagKey &key) const |
less-than operation comparing only group numbers | |
int | groupGT (const DcmTagKey &key) const |
greater-than operation comparing only group numbers | |
int | groupEQ (const DcmTagKey &key) const |
comparison operation comparing only group numbers | |
int | elementLT (const DcmTagKey &key) const |
less-than operation comparing only element numbers | |
int | elementGT (const DcmTagKey &key) const |
greater-than operation comparing only element numbers | |
int | elementEQ (const DcmTagKey &key) const |
comparison operation comparing only element numbers | |
this class encapsulates an attribute tag (group, element) and a VR.
It maintains a private creator name for private tags and caches the attribute name, once it is looked up in the data dictionary. This class maintains the interface to the DICOM data dictionary, i.e. performs look-ups of attribute VR and name in the background. Therefore, creation of DcmTag element is significantly more expensive than creation of simple DcmTagKey objects unless the VR is passed in the constructor.
DcmTag::DcmTag | ( | const DcmTagKey & | akey | ) |
constructor.
Initializes group/element from given tag key and performs a dictionary lookup for the VR. The lookup only considers standard tags, tags with private creator are ignored.
akey | tag key |
DcmTag::DcmTag | ( | Uint16 | g, |
Uint16 | e | ||
) |
constructor.
Initializes group/element from given parameters and performs a dictionary lookup for the VR. The lookup only considers standard tags, tags with private creator are ignored.
g | tag group |
e | tag element |
constructor.
Initializes group/element and VR from given parameters. No dictionary lookup needed/performed.
akey | tag key |
avr | VR |
DcmTag::DcmTag | ( | Uint16 | g, |
Uint16 | e, | ||
const DcmVR & | avr | ||
) |
constructor.
Initializes group/element and VR from given parameters. No dictionary lookup needed/performed.
g | tag group |
e | tag element |
avr | VR |
|
static |
convert the given string to a DICOM tag value
name | name or tag of the attribute to be searched for. If the name of the attribute is given the spelling has to be consistent with the spelling used in the data dictionary (e.g. "PatientName"). If the tag values are used the format is "gggg,eeee" (i.e. two hexa- decimal numbers separated by a comma). |
value | variable in which the resulting tag value is stored. If this functions fails to find the specified tag, this variable remains unchanged. |
Referenced by error().
|
inline |
returns tag element
Definition at line 119 of file dctag.h.
References DcmTagKey::getElement().
Referenced by DcmObject::getETag().
|
inline |
returns tag group
Definition at line 114 of file dctag.h.
References DcmTagKey::getGroup().
Referenced by DcmObject::getGTag().
const char* DcmTag::getPrivateCreator | ( | ) | const |
returns the current private creator string for this object if any, NULL otherwise.
Referenced by getXTag().
const char* DcmTag::getTagName | ( | ) |
returns name of attribute tag.
If name has not been accessed before, a dictionary lookup under consideration of the current private creator code is performed. If no attribute name is found, a default name is used. Never returns NULL.
Referenced by I2DOutputPlug::checkAndInventType1Attrib(), I2DOutputPlug::checkAndInventType2Attrib(), DcmObject::getTagName(), and getXTag().
|
inline |
returns a copy of the tag key by value
Definition at line 124 of file dctag.h.
References getPrivateCreator(), getTagName(), isSignable(), isUnknownVR(), lookupVRinDictionary(), and setPrivateCreator().
OFBool DcmTag::isSignable | ( | ) | const |
returns true if a data element with the given tag and VR can be digitally signed, false otherwise
Referenced by getXTag().
void DcmTag::lookupVRinDictionary | ( | ) |
performs a look-up of the VR for the current tag key in the dictionary, under consideration of the private creator (if defined).
If a dictionary entry is found, the VR of this object is copied from the dictionary entry, otherwise the VR remains unmodified.
Referenced by getXTag().
void DcmTag::setPrivateCreator | ( | const char * | privCreator | ) |
assigns a private creator code and deletes a possibly cached attribute name since the attribute name could change if a different private creator code is used.
privCreator | private creator code, may be NULL |
Referenced by getXTag().
|
private |
replace privateCreator with copy of given string
c | new private creator |
Referenced by error().
|
private |