DCMTK Version 3.6.9 OFFIS DICOM Toolkit

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
DcmElement Class Referenceabstract

abstract base class for all DICOM elements More...

Inheritance diagram for DcmElement:

## Public Member Functions
| DcmElement (const DcmTag &tag, const Uint32 len=0)
| constructor.
| DcmElement (const DcmElement &old)
| copy constructor
virtual | ~DcmElement ()
| destructor
DcmElement & | operator= (const DcmElement &obj)
| assignment operator
virtual int | compare (const DcmElement &rhs) const =0
| comparison operator that compares the normalized value of this element with a given element of the same type (e.g.
virtual OFCondition | copyFrom (const DcmObject &rhs)
| Virtual object copying.
virtual Uint32 | calcElementLength (const E_TransferSyntax xfer, const E_EncodingType enctype)
| calculate the length of this DICOM element when encoded with the given transfer syntax and the given encoding type for sequences.
virtual Uint32 | getLength (const E_TransferSyntax xfer=EXS_LittleEndianImplicit, const E_EncodingType enctype=EET_UndefinedLength)
| calculate the value length (without attribute tag, VR and length field) of this DICOM element when encoded with the given transfer syntax and the given encoding type for sequences.
virtual OFBool | isLeaf () const
| check if this element is a leaf node in a dataset tree.
virtual OFBool | isElement () const
| check if this element can be safely casted to DcmElement
OFBool | valueLoaded () const
| check if value of this element is loaded into main memory
virtual void | transferInit ()
| initialize the transfer state of this object.
virtual OFBool | canWriteXfer (const E_TransferSyntax newXfer, const E_TransferSyntax oldXfer)
| check if this DICOM object can be encoded in the given transfer syntax.
virtual OFCondition | read (DcmInputStream &inStream, const E_TransferSyntax ixfer, const E_GrpLenEncoding glenc=EGL_noChange, const Uint32 maxReadLength=DCM_MaxReadLength)
| This function reads the data value of an attribute which is captured in the input stream and captures this information in this.
virtual OFCondition | write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache)
| This function writes this element's value to the outstream which was passed.
virtual OFCondition | writeXML (STD_NAMESPACE ostream &out, const size_t flags=0)
| write object in XML format
virtual OFCondition | writeJson (STD_NAMESPACE ostream &out, DcmJsonFormat &format)
| write object in JSON format
virtual OFCondition | writeSignatureFormat (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache)
| special write method for creation of digital signatures
virtual OFCondition | clear ()
| clear (remove) attribute value
virtual OFCondition | checkValue (const OFString &vm="1-n", const OFBool oldFormat=OFFalse)
| check whether stored value conforms to the VR and to the specified VM
virtual OFCondition | loadAllDataIntoMemory ()
| this method loads all attribute values maintained by this object and all sub-objects (in case of a container such as DcmDataset) into memory.
virtual OFCondition | getUint8 (Uint8 &val, const unsigned long pos=0)
| retrieve a single value of type Uint8.
virtual OFCondition | getSint16 (Sint16 &val, const unsigned long pos=0)
| retrieve a single value of type Sint16.
virtual OFCondition | getUint16 (Uint16 &val, const unsigned long pos=0)
| retrieve a single value of type Uint16.
virtual OFCondition | getSint32 (Sint32 &val, const unsigned long pos=0)
| retrieve a single value of type Sint32.
virtual OFCondition | getUint32 (Uint32 &val, const unsigned long pos=0)
| retrieve a single value of type Uint32.
virtual OFCondition | getFloat32 (Float32 &val, const unsigned long pos=0)
| retrieve a single value of type Float32.
virtual OFCondition | getSint64 (Sint64 &val, const unsigned long pos=0)
| retrieve a single value of type Sint64.
virtual OFCondition | getUint64 (Uint64 &val, const unsigned long pos=0)
| retrieve a single value of type Uint64.
virtual OFCondition | getFloat64 (Float64 &val, const unsigned long pos=0)
| retrieve a single value of type Float64.
virtual OFCondition | getTagVal (DcmTagKey &val, const unsigned long pos=0)
| retrieve a single value of type DcmTagKey.
virtual OFCondition | getOFString (OFString &str, const unsigned long pos, OFBool normalize=OFTrue)
| retrieve a single value of type string.
virtual OFCondition | getOFStringArray (OFString &value, OFBool normalize=OFTrue)
| get entire element value as a character string.
virtual OFCondition | getString (char *&val)
| get a pointer to the element value of the current element as type string.
virtual OFCondition | getString (char *&val, Uint32 &len)
| get a pointer to the element value of the current element as type string.
virtual OFCondition | getUint8Array (Uint8 *&val)
| get a pointer to the element value of the current element as type string.
virtual OFCondition | getSint16Array (Sint16 *&val)
| get a pointer to the element value of the current element as type Sint16.
virtual OFCondition | getUint16Array (Uint16 *&val)
| get a pointer to the element value of the current element as type Uint16.
virtual OFCondition | getSint32Array (Sint32 *&val)
| get a pointer to the element value of the current element as type Sint32.
virtual OFCondition | getUint32Array (Uint32 *&val)
| get a pointer to the element value of the current element as type Uint32.
virtual OFCondition | getFloat32Array (Float32 *&val)
| get a pointer to the element value of the current element as type Float32.
virtual OFCondition | getSint64Array (Sint64 *&val)
| get a pointer to the element value of the current element as type Sint64.
virtual OFCondition | getUint64Array (Uint64 *&val)
| get a pointer to the element value of the current element as type Uint64.
virtual OFCondition | getFloat64Array (Float64 *&val)
| get a pointer to the element value of the current element as type Float64.
OFCondition | detachValueField (OFBool copy=OFFalse)
| detach the value field from the DICOM element (i.e., this object).
virtual OFCondition | putOFStringArray (const OFString &val)
| replace the element value by a copy of the given string (which is possibly multi-valued).
virtual OFCondition | putString (const char *val)
| replace the element value by a copy of the given string (which is possibly multi-valued).
virtual OFCondition | putString (const char *val, const Uint32 len)
| replace the element value by a copy of the given string (which is possibly multi-valued).
virtual OFCondition | putSint16 (const Sint16 val, const unsigned long pos=0)
| insert into the element value a copy of the given Sint16 value.
virtual OFCondition | putUint16 (const Uint16 val, const unsigned long pos=0)
| insert into the element value a copy of the given Uint16 value.
virtual OFCondition | putSint32 (const Sint32 val, const unsigned long pos=0)
| insert into the element value a copy of the given Sint32 value.
virtual OFCondition | putUint32 (const Uint32 val, const unsigned long pos=0)
| insert into the element value a copy of the given Uint32 value.
virtual OFCondition | putFloat32 (const Float32 val, const unsigned long pos=0)
| insert into the element value a copy of the given Float32 value.
virtual OFCondition | putFloat64 (const Float64 val, const unsigned long pos=0)
| insert into the element value a copy of the given Float64 value.
virtual OFCondition | putTagVal (const DcmTagKey &attrTag, const unsigned long pos=0)
| insert into the element value a copy of the given DcmTagKey value.
virtual OFCondition | putUint8Array (const Uint8 *vals, const unsigned long num)
| replace the element value by a copy of the given Uint8 array (which is possibly multi-valued).
virtual OFCondition | putSint16Array (const Sint16 *vals, const unsigned long num)
| replace the element value by a copy of the given Sint16 array (which is possibly multi-valued).
virtual OFCondition | putUint16Array (const Uint16 *vals, const unsigned long num)
| replace the element value by a copy of the given Uint16 array (which is possibly multi-valued).
virtual OFCondition | putSint32Array (const Sint32 *vals, const unsigned long num)
| replace the element value by a copy of the given Sint32 array (which is possibly multi-valued).
virtual OFCondition | putUint32Array (const Uint32 *vals, const unsigned long num)
| replace the element value by a copy of the given Uint32 array (which is possibly multi-valued).
virtual OFCondition | putFloat32Array (const Float32 *vals, const unsigned long num)
| replace the element value by a copy of the given Float32 array (which is possibly multi-valued).
virtual OFCondition | putFloat64Array (const Float64 *vals, const unsigned long num)
| replace the element value by a copy of the given Float64 array (which is possibly multi-valued).
virtual OFCondition | getPartialValue (void *targetBuffer, const Uint32 offset, Uint32 numBytes, DcmFileCache *cache=NULL, E_ByteOrder byteOrder=gLocalByteOrder)
| Copy numBytes bytes of data from the attribute value in byteOrder byte order to targetBuffer, starting at byte offset offset of the attribute value.
virtual OFCondition | createUint8Array (const Uint32 numBytes, Uint8 *&bytes)
| create an empty Uint8 array of given number of bytes and set it.
virtual OFCondition | createUint16Array (const Uint32 numWords, Uint16 *&words)
| create an empty Uint16 array of given number of words and set it.
virtual OFCondition | createValueFromTempFile (DcmInputStreamFactory *factory, const Uint32 length, const E_ByteOrder byteOrder)
| replace the attribute value with the content of the given temporary file.
virtual void | compact ()
| remove the attribute value from memory if the attribute value can be loaded from file when needed again.
virtual OFCondition | getUncompressedFrameSize (DcmItem *dataset, Uint32 &frameSize, OFBool pixelDataIsUncompressed) const
| compute uncompressed frame size of a single frame of this image.
virtual OFCondition | getUncompressedFrame (DcmItem *dataset, Uint32 frameNo, Uint32 &startFragment, void *buffer, Uint32 bufSize, OFString &decompressedColorModel, DcmFileCache *cache=NULL)
| access single frame without decompressing or loading a complete multi-frame object.
virtual OFCondition | getDecompressedColorModel (DcmItem *dataset, OFString &decompressedColorModel)
| determine color model of the decompressed image
virtual OFBool | isUniversalMatch (const OFBool normalize=OFTrue, const OFBool enableWildCardMatching=OFTrue)
| Determine if this element is universal matching.
virtual OFBool | matches (const DcmElement &candidate, const OFBool enableWildCardMatching=OFTrue) const
| perform attribute matching.
virtual OFBool | combinationMatches (const DcmElement &keySecond, const DcmElement &candidateFirst, const DcmElement &candidateSecond) const
| perform combined attribute matching.
const DcmInputStreamFactory * | getInputStream () const
| returns a pointer to the input stream, if available, NULL otherwise.
Public Member Functions inherited from DcmObject
| DcmObject (const DcmTag &tag, const Uint32 len=0)
| constructor.
| DcmObject (const DcmObject &obj)
| copy constructor
virtual | ~DcmObject ()
| destructor
virtual DcmObject * | clone () const =0
| clone method
DcmObject & | operator= (const DcmObject &obj)
| copy assignment operator
virtual DcmEVR | ident () const =0
| return identifier for this class.
DcmEVR | getVR () const
| return the value representation assigned to this object.
OFBool | isaString () const
| check if this element is a string type, based on the VR.
virtual OFBool | isNested () const
| check if this element is nested in a sequence of items, i.e. not a top-level or stand-alone element
virtual void | print (STD_NAMESPACE ostream &out, const size_t flags=0, const int level=0, const char *pixelFileName=NULL, size_t *pixelCounter=NULL)=0
| print object to a stream
E_TransferState | transferState () const
| return the current transfer (read/write) state of this object.
virtual void | transferEnd (void)
| finalize the transfer state of this object.
DcmItem * | getRootItem ()
| get root dataset/item (top-level) that contains this object.
virtual DcmItem * | getParentItem ()
| get parent item of this object.
DcmObject * | getParent ()
| get parent of this object.
const DcmObject * | getParent () const
| get parent of this object.
void | setParent (DcmObject *parent)
| set parent of this object.
Uint16 | getGTag () const
| return the group number of the attribute tag for this object
Uint16 | getETag () const
| return the element number of the attribute tag for this object
const DcmTag & | getTag () const
| return const reference to the attribute tag for this object
void | setGTag (Uint16 gtag)
| assign group tag (but not element tag) of the attribute tag for this object.
virtual OFCondition | setVR (DcmEVR vr)
| assign a new Value Representation (VR) to this object.
virtual unsigned long | getVM ()=0
| get value multiplicity of this object.
virtual unsigned long | getNumberOfValues ()=0
| get number of values stored in this object
virtual OFBool | isSignable () const
| returns true if the current object may be included in a digital signature
virtual OFBool | containsUnknownVR () const
| returns true if the object contains an element with Unknown VR at any nesting level
virtual OFBool | containsExtendedCharacters (const OFBool checkAllStrings=OFFalse)
| check if this object contains non-ASCII characters
virtual OFBool | isAffectedBySpecificCharacterSet () const
| check if this object is affected by SpecificCharacterSet
virtual OFCondition | convertCharacterSet (DcmSpecificCharacterSet &converter)
| convert this object from the currently selected source character set to the currently selected destination character set (if affected by SpecificCharacterSet)
virtual OFBool | isEmpty (const OFBool normalize=OFTrue)
| check if this object is empty
virtual OFCondition | verify (const OFBool autocorrect=OFFalse)=0
| check the currently stored element value
virtual DcmObject * | nextInContainer (const DcmObject *obj)
| this method is only used in container classes derived from this class, that is, DcmItem and DcmSequenceOfItems.
virtual OFCondition | nextObject (DcmStack &stack, const OFBool intoSub)
| this method enables a stack based, depth-first traversal of a complete hierarchical DICOM dataset (that is, classes derived from DcmItem or DcmSequenceOfItems).
virtual OFCondition | search (const DcmTagKey &xtag, DcmStack &resultStack, E_SearchMode mode=ESM_fromHere, OFBool searchIntoSub=OFTrue)
| a complex, stack-based, hierarchical search method.
Uint32 | getLengthField () const
| return the current value of the Length field (which is different from the functionality of the public getLength() method).

## Static Public Member Functions
static int | scanValue (const OFString &value, const OFString &vr, const size_t pos=0, const size_t num=OFString_npos)
| scan string value for conformance with given value representation (VR)
static int | scanValue (const OFString &vr, const char *const value, const size_t size)
| scan string value for conformance with given value representation (VR)
static unsigned long | determineVM (const char *str, const size_t len)
| determine the number of values stored in a string, i.e. the value multiplicity (VM)
static size_t | getValueFromString (const char *str, const size_t pos, const size_t len, OFString &val)
| get the first value stored in the given string.
static OFCondition | checkVM (const unsigned long vmNum, const OFString &vmStr)
| check for correct value multiplicity (VM)

## Protected Member Functions
void * | getValue (const E_ByteOrder newByteOrder=gLocalByteOrder)
| This function returns this element's value.
OFCondition | changeValue (const void *value, const Uint32 position, const Uint32 num)
| insert into the element value a copy of the given raw value.
OFCondition | putValue (const void *value, const Uint32 length)
| replace the element value by a copy of the given raw data block
OFCondition | createEmptyValue (const Uint32 length)
| create a new, empty value field of given size.
OFCondition | loadValue (DcmInputStream *inStream=NULL)
| This function reads the data value of an attribute and stores the information which was read in this.
virtual void | postLoadValue ()
| performs clean-up functions after loading an attribute value into main memory.
virtual Uint8 * | newValueField ()
| This function creates a byte array of Length bytes and returns this array.
void | swapValueField (size_t valueWidth)
| swaps the content of the value field (if loaded) from big-endian to little-endian or back
virtual void | writeXMLStartTag (STD_NAMESPACE ostream &out, const size_t flags, const char *attrText=NULL)
| write element start tag in XML format
virtual void | writeXMLEndTag (STD_NAMESPACE ostream &out, const size_t flags)
| write element end tag in XML format
virtual void | writeJsonOpener (STD_NAMESPACE ostream &out, DcmJsonFormat &format)
| write element start tag in JSON format
virtual void | writeJsonCloser (STD_NAMESPACE ostream &out, DcmJsonFormat &format)
| write element end tag in JSON format
E_ByteOrder | getByteOrder () const
| return the current byte order of the value field
void | setByteOrder (E_ByteOrder val)
| set the current byte order of the value field
Protected Member Functions inherited from DcmObject
void | printNestingLevel (STD_NAMESPACE ostream &out, const size_t flags, const int level)
| print line indentation, e.g. a couple of spaces for each nesting level.
void | printInfoLineStart (STD_NAMESPACE ostream &out, const size_t flags, const int level, DcmTag *tag=NULL)
| print beginning of the info line.
void | printInfoLineEnd (STD_NAMESPACE ostream &out, const size_t flags, const unsigned long printedLength=0xffffffff, DcmTag *tag=NULL)
| print end of the info line.
virtual void | printInfoLine (STD_NAMESPACE ostream &out, const size_t flags, const int level=0, const char *info=NULL, DcmTag *tag=NULL, const OFBool isInfo=OFTrue)
| print given text with element information.
virtual OFCondition | writeTagAndLength (DcmOutputStream &outStream, const E_TransferSyntax oxfer, Uint32 &writtenBytes) const
| write tag, VR and length field to the given output stream
virtual Uint32 | getTagAndLengthSize (const E_TransferSyntax oxfer) const
| return the number of bytes needed to serialize the tag, VR and length information of the current object using the given transfer syntax.
const char * | getTagName ()
| return the DICOM attribute tag name for this object.
void | setTagVR (DcmEVR vr)
| set the VR for this attribute
E_TransferState | getTransferState () const
| return the current transfer state of this object during serialization/deserialization
void | setTransferState (E_TransferState newState)
| set the current transfer state of this object during serialization/deserialization
Uint32 | getTransferredBytes () const
| return the number of transferred bytes for this object during serialization/deserialization
void | setTransferredBytes (Uint32 val)
| set the number of transferred bytes for this object during serialization/deserialization
void | incTransferredBytes (Uint32 val)
| add to the number of transferred bytes for this object during serialization/deserialization
void | setLengthField (Uint32 val)
| set the current value of the Length field

## Private Attributes
E_ByteOrder | fByteOrder
| current byte order of attribute value in memory
DcmInputStreamFactory * | fLoadValue
| required information to load value later
Uint8 * | fValue
| value of the element

## Friends
OFBool | operator< (const DcmElement &lhs, const DcmElement &rhs)
| Checks whether left hand side element is smaller than right hand side element.
OFBool | operator> (const DcmElement &lhs, const DcmElement &rhs)
| Checks whether left hand side element is greater than right hand side element.
OFBool | operator<= (const DcmElement &lhs, const DcmElement &rhs)
| Checks whether left hand side element is smaller than or equal to right hand side element.
OFBool | operator>= (const DcmElement &lhs, const DcmElement &rhs)
| Checks whether left hand side element is greater than or equal to right hand side element.

## Additional Inherited Members
Static Protected Member Functions inherited from DcmObject
static OFCondition | writeTag (DcmOutputStream &outStream, const DcmTag &tag, const E_TransferSyntax oxfer)
| static helper function that writes a given attribute tag to a binary output stream using the byte order indicated by the transfer syntax.
Protected Attributes inherited from DcmObject
OFCondition | errorFlag
| error flag for this object.

## Detailed Description

abstract base class for all DICOM elements

## Constructor & Destructor Documentation

## ◆ DcmElement() [1/2]

DcmElement::DcmElement | ( | const DcmTag & | tag,
|  | const Uint32 | len = 0 )

constructor.

Create new element from given tag and length.

Parameters

  tag | DICOM tag for the new element
  len | value length for the new element

Referenced by DcmElement(), DcmDate::combinationMatches(), combinationMatches(), DcmAttributeTag::compare(), DcmByteString::compare(), compare(), DcmFloatingPointDouble::compare(), DcmFloatingPointSingle::compare(), DcmLongText::compare(), DcmOtherByteOtherWord::compare(), DcmPixelData::compare(), DcmPolymorphOBOW::compare(), DcmSequenceOfItems::compare(), DcmShortText::compare(), DcmSigned64bitVeryLong::compare(), DcmSignedLong::compare(), DcmSignedShort::compare(), DcmUniversalResourceIdentifierOrLocator::compare(), DcmUnlimitedText::compare(), DcmUnsigned64bitVeryLong::compare(), DcmUnsignedLong::compare(), DcmUnsignedShort::compare(), DcmByteString::matches(), matches(), DcmFloatingPointDouble::matches(), DcmFloatingPointSingle::matches(), DcmSignedLong::matches(), DcmSignedShort::matches(), DcmUnsignedLong::matches(), DcmUnsignedShort::matches(), operator<, operator<=, operator=(), operator>, and operator>=.

## ◆ DcmElement() [2/2]

DcmElement::DcmElement | ( | const DcmElement & | old | ) |

copy constructor

Parameters

  old | element to be copied

References DcmElement().

## Member Function Documentation

## ◆ calcElementLength()

virtual Uint32 DcmElement::calcElementLength | ( | const E_TransferSyntax | xfer,
|  | const E_EncodingType | enctype )
| virtual

calculate the length of this DICOM element when encoded with the given transfer syntax and the given encoding type for sequences.

For elements, the length includes the length of the tag, length field, VR field and the value itself, for items and sequences it returns the length of the complete item or sequence including delimitation tags if applicable.

Warning
  Since calcElementLength() returns a 32 bit integer, an overflow during calculation is possible for some derived classes that actually represent a compound value (e.g. items like DcmPixelItem). Such overflows will be detected, in which case the maximum possible value will be returned instead, coinciding with DCM_UndefinedLength.
  The implementation in DcmPixelData may return zero if no conforming representation exists and set the EC_RepresentationNotFound error flag to indicated it.
  When calculation the length of a sequence or an item containing multiple attributes, the implementation may return DCM_UndefinedLength to indicate a value that can not be encoded as a 32 bit length field. It will even do so if "dcmWriteOversizedSeqsAndItemsUndefined" is disabled, but then also set the EC_SeqOrItemContentOverflow error flag (inside getLength()) to indicated it.

Note
  Just check for zero or DCM_UndefinedLength return value and then have a look at the error flag in either case.

Parameters

  xfer | transfer syntax for length calculation
  enctype | sequence encoding type for length calculation

Returns
  length of DICOM element

Implements DcmObject.

Reimplemented in DcmFileFormat, DcmPixelData, DcmPixelItem, DcmPixelSequence, and DcmSequenceOfItems.

## ◆ canWriteXfer()

virtual OFBool DcmElement::canWriteXfer | ( | const E_TransferSyntax | newXfer,
|  | const E_TransferSyntax | oldXfer )
| virtual

check if this DICOM object can be encoded in the given transfer syntax.

Parameters

  newXfer | transfer syntax in which the DICOM object is to be encoded
  oldXfer | transfer syntax in which the DICOM object was read or created.

Returns
  true if object can be encoded in desired transfer syntax, false otherwise.

Implements DcmObject.

Reimplemented in DcmFileFormat, DcmOtherByteOtherWord, DcmPixelData, DcmPixelSequence, and DcmSequenceOfItems.

## ◆ changeValue()

OFCondition DcmElement::changeValue | ( | const void * | value,
|  | const Uint32 | position,
|  | const Uint32 | num )
| protected

insert into the element value a copy of the given raw value.

If the attribute is multi-valued, all other values remain untouched. Only works for fixed-size VRs, not for strings.

Parameters

  value | new value to be inserted
  position | position for insert operation. Value: pos <= getVM(), i.e. a value can be appended to the end of the current element or inserted within the existing value field.
  num | number of bytes for each value in the value field.

Returns
  EC_Normal upon success, an error code otherwise

## ◆ checkValue()

virtual OFCondition DcmElement::checkValue | ( | const OFString & | vm = "1-n",
|  | const OFBool | oldFormat = OFFalse )
| virtual

check whether stored value conforms to the VR and to the specified VM

Parameters

  vm | value multiplicity (according to the data dictionary) to be checked for. (See DcmElement::checkVM() for a list of valid values.) Interpreted as cardinality (number of items) for sequence attributes.
  oldFormat | support old ACR/NEMA format for certain VRs (DA, TM, PN) if OFTrue

Returns
  status of the check, EC_Normal if value is correct, an error code otherwise

Reimplemented in DcmAgeString, DcmApplicationEntity, DcmAttributeTag, DcmCodeString, DcmDate, DcmDateTime, DcmDecimalString, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmIntegerString, DcmLongString, DcmLongText, DcmOther64bitVeryLong, DcmOtherByteOtherWord, DcmOtherDouble, DcmOtherFloat, DcmOtherLong, DcmPersonName, DcmSequenceOfItems, DcmShortString, DcmShortText, DcmSigned64bitVeryLong, DcmSignedLong, DcmSignedShort, DcmTime, DcmUniqueIdentifier, DcmUniversalResourceIdentifierOrLocator, DcmUnlimitedCharacters, DcmUnlimitedText, DcmUnsigned64bitVeryLong, DcmUnsignedLong, and DcmUnsignedShort.

## ◆ checkVM()

static OFCondition DcmElement::checkVM | ( | const unsigned long | vmNum,
|  | const OFString & | vmStr )
| static

check for correct value multiplicity (VM)

Parameters

  vmNum | value multiplicity of the value to be checked. For empty values (vmNum=0), the status of the check is always EC_Normal (i.e. no error).
  vmStr | value multiplicity (according to the data dictionary) to be checked for. (valid values: "1", "1-2", "1-3", "1-8", "1-99", "1-n", "2", "2-4", "2-n", "2-2n", "3", "3-n", "3-3n", "4", "4-5", "4-4n", "5", "5-n", "6", "6-n", "7", "7-7n", "8", "9", "11", "16", "24", "32", "256")

Returns
  status of the check, EC_ValueMultiplicityViolated in case of error

## ◆ clear()

virtual OFCondition DcmElement::clear | ( |  | ) |
| virtual

clear (remove) attribute value

Returns
  EC_Normal if successful, an error code otherwise

Implements DcmObject.

Reimplemented in DcmByteString, DcmFileFormat, DcmSequenceOfItems, and DcmUnsignedLongOffset.

## ◆ combinationMatches()

virtual OFBool DcmElement::combinationMatches | ( | const DcmElement & | keySecond,
|  | const DcmElement & | candidateFirst,
|  | const DcmElement & | candidateSecond ) const
| virtual

perform combined attribute matching.

Combine the given Attributes to one pair of matching key and candidate respectively and perform attribute matching on the result.

Note
  The DICOM standard currently defines combined attribute matching for the VR DA in combination with TM, such that two attributes can be combined into a single attribute with VR=DT before matching against another pair of attributes with VR DA and TM. The method will return OFFalse if this element's VR is not DA or the given attributes are not of VR TM, DA and TM respectively.

Parameters

  keySecond | the second part of the matching key that will be combined with this element.
  candidateFirst | the first part of the candidate that will be matched against this this element + keySecond.
  candidateSecond | the second part of the candidate that will be combined with candidateFirst for matching against this element + keySecond.

Returns
  OFTrue if the combination of this element and keySecond match with the combination of candidateFirst and candidateSecond. OFFalse otherwise.

Reimplemented in DcmDate.

References DcmElement().

## ◆ compact()

virtual void DcmElement::compact | ( |  | ) |
| virtual

remove the attribute value from memory if the attribute value can be loaded from file when needed again.

Otherwise do nothing.

## ◆ compare()

virtual int DcmElement::compare | ( | const DcmElement & | rhs | ) | const
| pure virtual

comparison operator that compares the normalized value of this element with a given element of the same type (e.g.

an DcmUnsignedShort with a DcmUnsignedShort). The tag of the element is also considered as the first component that is compared, followed by the object types (VR, i.e. DCMTK'S EVR). DcmElement's default implementation does only compare the tag and EVR while the derived classes implement the value comparisons by comparing all the components that make up the value, preferably in the order declared in the object (if applicable).

Parameters

  rhs | the right hand side of the comparison

Returns
  0 if the object values are equal. -1 if this element has fewer components than the rhs element. Also -1 if the value of the first component that does not match is lower in this object than in rhs. Also returned if rhs cannot be casted to this object type or both objects are of different VR (i.e. the DcmEVR returned by the element's ident() call are different). 1 if either this element has more components than the rhs element, or if the first component that does not match is greater in this object than in rhs object. If the function is overwritten by derived classes, the behaviour might slightly change but all methods will return 0 on equality, and 1 or -1 if different.

Implemented in DcmAttributeTag, DcmByteString, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmLongText, DcmOtherByteOtherWord, DcmPixelData, DcmPolymorphOBOW, DcmSequenceOfItems, DcmShortText, DcmSigned64bitVeryLong, DcmSignedLong, DcmSignedShort, DcmUniversalResourceIdentifierOrLocator, DcmUnlimitedText, DcmUnsigned64bitVeryLong, DcmUnsignedLong, and DcmUnsignedShort.

References DcmElement().

Referenced by operator<.

## ◆ copyFrom()

virtual OFCondition DcmElement::copyFrom | ( | const DcmObject & | rhs | ) |
| virtual

Virtual object copying.

This method can be used for DcmObject and derived classes to get a deep copy of an object. Internally the assignment operator is called if the given DcmObject parameter is of the same type as "this" object instance. If not, an error is returned. This function permits copying an object by value in a virtual way which therefore is different to just calling the assignment operator of DcmElement which could result in slicing the object.

Parameters

  rhs | - [in] The instance to copy from. Has to be of the same class type as "this" object

Returns
  EC_Normal if copying was successful, error otherwise

Implements DcmObject.

Reimplemented in DcmAgeString, DcmApplicationEntity, DcmAttributeTag, DcmByteString, DcmCharString, DcmCodeString, DcmDate, DcmDateTime, DcmDecimalString, DcmFileFormat, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmIntegerString, DcmLongString, DcmLongText, DcmOther64bitVeryLong, DcmOtherByteOtherWord, DcmOtherDouble, DcmOtherFloat, DcmOtherLong, DcmOverlayData, DcmPersonName, DcmPixelData, DcmPixelItem, DcmPixelSequence, DcmPolymorphOBOW, DcmSequenceOfItems, DcmShortString, DcmShortText, DcmSigned64bitVeryLong, DcmSignedLong, DcmSignedShort, DcmTime, DcmUniqueIdentifier, DcmUniversalResourceIdentifierOrLocator, DcmUnlimitedCharacters, DcmUnlimitedText, DcmUnsigned64bitVeryLong, DcmUnsignedLong, DcmUnsignedLongOffset, and DcmUnsignedShort.

References DcmObject::DcmObject().

## ◆ createEmptyValue()

OFCondition DcmElement::createEmptyValue | ( | const Uint32 | length | ) |
| protected

create a new, empty value field of given size.

Parameters

  length | size of new value field in bytes

Returns
  EC_Normal if successful, an error code otherwise.

## ◆ createUint16Array()

virtual OFCondition DcmElement::createUint16Array | ( | const Uint32 | numWords,
|  | Uint16 *& | words )
| virtual

create an empty Uint16 array of given number of words and set it.

All array elements are initialized with a value of 0 (using 'memset'). This method is only applicable to OW data.

Parameters

  numWords | number of words (16 bit) to be created
  words | stores the pointer to the resulting buffer

Returns
  status, EC_Normal if successful, an error code otherwise

Reimplemented in DcmOtherByteOtherWord, DcmPixelData, and DcmPolymorphOBOW.

## ◆ createUint8Array()

virtual OFCondition DcmElement::createUint8Array | ( | const Uint32 | numBytes,
|  | Uint8 *& | bytes )
| virtual

create an empty Uint8 array of given number of bytes and set it.

All array elements are initialized with a value of 0 (using 'memset'). This method is only applicable to certain VRs, e.g. OB.

Parameters

  numBytes | number of bytes (8 bit) to be created
  bytes | stores the pointer to the resulting buffer

Returns
  status, EC_Normal if successful, an error code otherwise

Reimplemented in DcmOtherByteOtherWord, DcmPixelData, and DcmPolymorphOBOW.

## ◆ createValueFromTempFile()

virtual OFCondition DcmElement::createValueFromTempFile | ( | DcmInputStreamFactory * | factory,
|  | const Uint32 | length,
|  | const E_ByteOrder | byteOrder )
| virtual

replace the attribute value with the content of the given temporary file.

The temporary file is not opened/loaded until the attribute value is accessed, very much like large attributes that remain in file during a read operation.

Parameters

  factory | a factory object that is able to create an input stream to the temporary file at the right location.
  length | attribute value length, in bytes. Must be even length. The length is not checked against the real length of the temporary file, which might be written or completed after the call to this method.
  byteOrder | byte order in the temporary file

Returns
  EC_Normal upon success, an error code otherwise.

Reimplemented in DcmPixelData.

## ◆ detachValueField()

OFCondition DcmElement::detachValueField | ( | OFBool | copy = OFFalse | ) |

detach the value field from the DICOM element (i.e., this object).

After detaching the calling part of the application has total control over the element value, especially the value must be deleted from the heap after use. The DICOM element remains a copy of the value if the copy parameter is OFTrue; otherwise the value is erased in the DICOM element.

Parameters

  copy | if true, copy value field before detaching; if false, do not retain a copy.

Returns
  EC_Normal upon success, an error code otherwise

## ◆ determineVM()

static unsigned long DcmElement::determineVM | ( | const char * | str,
|  | const size_t | len )
| static

determine the number of values stored in a string, i.e. the value multiplicity (VM)

Parameters

  str | character string
  len | length of the string (number of characters without the trailing NULL byte)

Returns
  number of values separated by backslash characters in the given string

## ◆ getByteOrder()

E_ByteOrder DcmElement::getByteOrder | ( |  | ) | const
| inline protected

return the current byte order of the value field

Returns
  current byte order of the value field

References fByteOrder.

## ◆ getDecompressedColorModel()

virtual OFCondition DcmElement::getDecompressedColorModel | ( | DcmItem * | dataset,
|  | OFString & | decompressedColorModel )
| virtual

determine color model of the decompressed image

Parameters

  dataset | pointer to DICOM dataset in which this pixel data object is located. Used to access photometric interpretation.
  decompressedColorModel | upon successful return, the color model of the decompressed image (which may be different from the one used in the compressed images) is returned in this parameter

Returns
  EC_Normal if successful, an error code otherwise

Reimplemented in DcmPixelData.

## ◆ getFloat32()

virtual OFCondition DcmElement::getFloat32 | ( | Float32 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Float32.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmFloatingPointSingle.

## ◆ getFloat32Array()

virtual OFCondition DcmElement::getFloat32Array | ( | Float32 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type Float32.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmFloatingPointSingle.

## ◆ getFloat64()

virtual OFCondition DcmElement::getFloat64 | ( | Float64 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Float64.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmDecimalString, and DcmFloatingPointDouble.

## ◆ getFloat64Array()

virtual OFCondition DcmElement::getFloat64Array | ( | Float64 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type Float64.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmFloatingPointDouble.

## ◆ getInputStream()

const DcmInputStreamFactory * DcmElement::getInputStream | ( |  | ) | const
| inline

returns a pointer to the input stream, if available, NULL otherwise.

In general, this pointer is available when the element is part of a dataset that has been read from a DICOM file, the file is not encoded in deflate transfer syntax, and the element value is large enough that loading the value has been postponed to the first read access. The DcmInputStreamFactory object can create an instance of a file stream seeked to the right position within the DICOM file from where the element value can be read.

Returns
  pointer to the input stream factory of the element, null if no object is available

References fLoadValue.

## ◆ getLength()

virtual Uint32 DcmElement::getLength | ( | const E_TransferSyntax | xfer = EXS_LittleEndianImplicit,
|  | const E_EncodingType | enctype = EET_UndefinedLength )
| inline virtual

calculate the value length (without attribute tag, VR and length field) of this DICOM element when encoded with the given transfer syntax and the given encoding type for sequences.

Never returns undefined length.

Parameters

  xfer | transfer syntax for length calculation
  enctype | sequence encoding type for length calculation

Returns
  value length of DICOM element

Implements DcmObject.

Reimplemented in DcmByteString, DcmPixelData, and DcmSequenceOfItems.

References EET_UndefinedLength, EXS_LittleEndianImplicit, and DcmObject::getLengthField().

## ◆ getOFString()

virtual OFCondition DcmElement::getOFString | ( | OFString & | str,
|  | const unsigned long | pos,
|  | OFBool | normalize = OFTrue )
| virtual

retrieve a single value of type string.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  str | value returned in this parameter upon success
  pos | position in multi-valued attribute
  normalize | true if string is to be normalized (e.g. trailing space characters to be trimmed)

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmApplicationEntity, DcmAttributeTag, DcmByteString, DcmCodeString, DcmDate, DcmDateTime, DcmDecimalString, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmIntegerString, DcmLongString, DcmLongText, DcmOtherByteOtherWord, DcmPersonName, DcmShortString, DcmShortText, DcmSigned64bitVeryLong, DcmSignedLong, DcmSignedShort, DcmTime, DcmUniqueIdentifier, DcmUniversalResourceIdentifierOrLocator, DcmUnlimitedCharacters, DcmUnlimitedText, DcmUnsigned64bitVeryLong, DcmUnsignedLong, and DcmUnsignedShort.

## ◆ getOFStringArray()

virtual OFCondition DcmElement::getOFStringArray | ( | OFString & | value,
|  | OFBool | normalize = OFTrue )
| virtual

get entire element value as a character string.

In case of VM > 1 the individual values are separated by a backslash ('\'). This method implements a general approach by concatenating the results of getOFString() for each value component. Derived class may implement more sophisticated methods.

Parameters

  value | variable in which the result value is stored
  normalize | normalize each element value prior to concatenation

Returns
  status, EC_Normal if successful, an error code otherwise

Reimplemented in DcmByteString, DcmLongText, DcmOtherByteOtherWord, DcmShortText, DcmUniversalResourceIdentifierOrLocator, and DcmUnlimitedText.

## ◆ getPartialValue()

virtual OFCondition DcmElement::getPartialValue | ( | void * | targetBuffer,
|  | const Uint32 | offset,
|  | Uint32 | numBytes,
|  | DcmFileCache * | cache = NULL,
|  | E_ByteOrder | byteOrder = gLocalByteOrder )
| virtual

Copy numBytes bytes of data from the attribute value in byteOrder byte order to targetBuffer, starting at byte offset offset of the attribute value.

This method does not cause the complete attribute value to be read into main memory. Subsequent calls for the same partial value may cause repeated access to file if the attribute value is kept in file.

Parameters

  targetBuffer | pointer to target buffer, must not be NULL. Buffer size must be at least numBytes bytes.
  offset | byte offset within the attribute value from where to start copying
  numBytes | number of bytes to copy.
  cache | file cache object that may be passed to multiple subsequent calls to this method for the same file; the file cache will then keep a file handle open, thus improving performance. Optional, may be NULL
  byteOrder | byte order desired byte order of attribute value in memory buffer. Default is the local byte order of the machine.

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSequenceOfItems.

References gLocalByteOrder.

Referenced by DiInputPixelTemplate< T1, T2 >::convert().

## ◆ getSint16()

virtual OFCondition DcmElement::getSint16 | ( | Sint16 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Sint16.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSignedShort.

## ◆ getSint16Array()

virtual OFCondition DcmElement::getSint16Array | ( | Sint16 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type Sint16.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSignedShort.

## ◆ getSint32()

virtual OFCondition DcmElement::getSint32 | ( | Sint32 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Sint32.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmIntegerString, and DcmSignedLong.

## ◆ getSint32Array()

virtual OFCondition DcmElement::getSint32Array | ( | Sint32 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type Sint32.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSignedLong.

## ◆ getSint64()

virtual OFCondition DcmElement::getSint64 | ( | Sint64 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Sint64.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSigned64bitVeryLong.

## ◆ getSint64Array()

virtual OFCondition DcmElement::getSint64Array | ( | Sint64 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type Sint64.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSigned64bitVeryLong.

## ◆ getString() [1/2]

virtual OFCondition DcmElement::getString | ( | char *& | val | ) |
| virtual

get a pointer to the element value of the current element as type string.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmByteString.

## ◆ getString() [2/2]

virtual OFCondition DcmElement::getString | ( | char *& | val,
|  | Uint32 & | len )
| virtual

get a pointer to the element value of the current element as type string.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success
  len | length of the returned value (number of characters)

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmByteString.

## ◆ getTagVal()

virtual OFCondition DcmElement::getTagVal | ( | DcmTagKey & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type DcmTagKey.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmAttributeTag.

## ◆ getUint16()

virtual OFCondition DcmElement::getUint16 | ( | Uint16 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Uint16.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmOtherByteOtherWord, and DcmUnsignedShort.

## ◆ getUint16Array()

virtual OFCondition DcmElement::getUint16Array | ( | Uint16 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type Uint16.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmAttributeTag, DcmOtherByteOtherWord, DcmPolymorphOBOW, and DcmUnsignedShort.

## ◆ getUint32()

virtual OFCondition DcmElement::getUint32 | ( | Uint32 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Uint32.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmUnsignedLong.

## ◆ getUint32Array()

virtual OFCondition DcmElement::getUint32Array | ( | Uint32 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type Uint32.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmUnsignedLong.

## ◆ getUint64()

virtual OFCondition DcmElement::getUint64 | ( | Uint64 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Uint64.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmUnsigned64bitVeryLong.

## ◆ getUint64Array()

virtual OFCondition DcmElement::getUint64Array | ( | Uint64 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type Uint64.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmUnsigned64bitVeryLong.

## ◆ getUint8()

virtual OFCondition DcmElement::getUint8 | ( | Uint8 & | val,
|  | const unsigned long | pos = 0 )
| virtual

retrieve a single value of type Uint8.

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | value returned in this parameter upon success
  pos | position in multi-valued attribute, default 0

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmOtherByteOtherWord.

Referenced by DcmIODUtil::copyFromUint8Array().

## ◆ getUint8Array()

virtual OFCondition DcmElement::getUint8Array | ( | Uint8 *& | val | ) |
| virtual

get a pointer to the element value of the current element as type string.

Requires element to be of corresponding VR, otherwise an error is returned. This method does not copy, but returns a pointer to the element value, which remains under control of this object and is valid only until the next read, write or put operation.

Parameters

  val | pointer to value returned in this parameter upon success

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmOtherByteOtherWord, and DcmPolymorphOBOW.

## ◆ getUncompressedFrame()

virtual OFCondition DcmElement::getUncompressedFrame | ( | DcmItem * | dataset,
|  | Uint32 | frameNo,
|  | Uint32 & | startFragment,
|  | void * | buffer,
|  | Uint32 | bufSize,
|  | OFString & | decompressedColorModel,
|  | DcmFileCache * | cache = NULL )
| virtual

access single frame without decompressing or loading a complete multi-frame object.

The frame is copied into the buffer passed by the caller which must be large enough to contain a complete frame.

Parameters

  dataset | pointer to DICOM dataset in which this pixel data object is located. Used to access rows, columns, samples per pixel etc.
  frameNo | number of frame, starting with 0 for the first frame.
  startFragment | index of the compressed fragment that contains all or the first part of the compressed bitstream for the given frameNo. Upon successful return this parameter is updated to contain the index of the first compressed fragment of the next frame. When unknown, zero should be passed. In this case the decompression algorithm will try to determine the index by itself, which will always work if frames are decompressed in increasing order from first to last, but may fail if frames are decompressed in random order, multiple fragments per frame and multiple frames are present in the dataset, and the offset table is empty.
  buffer | pointer to buffer allocated by the caller. The buffer must be large enough for one frame of this image.
  bufSize | size of buffer, in bytes
  decompressedColorModel | upon successful return, the color model of the decompressed image (which may be different from the one used in the compressed images) is returned in this parameter.
  cache | file cache object that may be passed to multiple subsequent calls to this method for the same file; the file cache will then keep a file handle open, thus improving performance. Optional, may be NULL

Returns
  EC_Normal if successful, an error code otherwise

Reimplemented in DcmPixelData.

## ◆ getUncompressedFrameSize()

virtual OFCondition DcmElement::getUncompressedFrameSize | ( | DcmItem * | dataset,
|  | Uint32 & | frameSize,
|  | OFBool | pixelDataIsUncompressed ) const
| virtual

compute uncompressed frame size of a single frame of this image.

Note that the value returned by this method does not include the pad byte to even size needed for a buffer into which a frame is to be loaded.

Parameters

  dataset | dataset in which this pixel data element is contained
  frameSize | frame size in bytes (without padding) returned in this parameter upon success, otherwise set to 0
  pixelDataIsUncompressed | flag indicating whether the frame to be accessed already exists in uncompressed form. This is important for the YBR_FULL_422 color model, which is never created by DCMTK's decoders but can exist in uncompressed format

Returns
  EC_Normal if successful, an error code otherwise

## ◆ getValue()

void * DcmElement::getValue | ( | const E_ByteOrder | newByteOrder = gLocalByteOrder | ) |
| protected

This function returns this element's value.

The returned value corresponds to the byte ordering (little or big endian) that was passed.

Parameters

  newByteOrder | The byte ordering that shall be accounted for (little or big endian).

References gLocalByteOrder.

## ◆ getValueFromString()

static size_t DcmElement::getValueFromString | ( | const char * | str,
|  | const size_t | pos,
|  | const size_t | len,
|  | OFString & | val )
| static

get the first value stored in the given string.

The individual values are separated by a backslash. Successive calls of this function allow for extracting all stored values.

Parameters

  str | character string
  pos | position of the first character in the string to search from
  len | length of the string (number of characters without the trailing NULL byte)
  val | variable in which the result is stored (empty string in case of error)

Returns
  position to be used for the next search, identical to 'pos' in case of error

## ◆ isElement()

virtual OFBool DcmElement::isElement | ( |  | ) | const
| inline virtual

check if this element can be safely casted to DcmElement

Returns
  true if DcmElement, false otherwise

Reimplemented from DcmObject.

## ◆ isLeaf()

virtual OFBool DcmElement::isLeaf | ( |  | ) | const
| inline virtual

check if this element is a leaf node in a dataset tree.

All subclasses of DcmElement except for DcmSequenceOfItems are leaf nodes, while DcmSequenceOfItems, DcmItem, DcmDataset etc. are not.

Returns
  true if leaf node, false otherwise.

Implements DcmObject.

Reimplemented in DcmSequenceOfItems.

## ◆ isUniversalMatch()

virtual OFBool DcmElement::isUniversalMatch | ( | const OFBool | normalize = OFTrue,
|  | const OFBool | enableWildCardMatching = OFTrue )
| virtual

Determine if this element is universal matching.

Parameters

  normalize | normalize each element value. Defaults to OFTrue.
  enableWildCardMatching | enable or disable wild card matching. Defaults to OFTrue, which means wild card matching is performed if the element's VR supports it. Set to OFFalse to force single value matching instead.

Returns
  returns OFTrue if element is empty or if enableWildCardMatching is enabled and the element contains only wildcard characters. Returns OFFalse otherwise.

Reimplemented in DcmApplicationEntity, DcmAttributeTag, DcmCharString, DcmCodeString, and DcmUniversalResourceIdentifierOrLocator.

## ◆ loadAllDataIntoMemory()

virtual OFCondition DcmElement::loadAllDataIntoMemory | ( |  | ) |
| virtual

this method loads all attribute values maintained by this object and all sub-objects (in case of a container such as DcmDataset) into memory.

After a call to this method, the file from which a dataset was read may safely be deleted or replaced. For large files, this method may obviously allocate large amounts of memory.

Returns
  EC_Normal if successful, an error code otherwise

Implements DcmObject.

Reimplemented in DcmPixelData, and DcmSequenceOfItems.

## ◆ loadValue()

OFCondition DcmElement::loadValue | ( | DcmInputStream * | inStream = NULL | ) |
| protected

This function reads the data value of an attribute and stores the information which was read in this.

The information is either read from the inStream or (if inStream is NULL) from a different stream which was created earlier and which is accessible through the fLoadValue member variable. Note that if not all information for an attribute could be read from the stream, the function returns EC_StreamNotifyClient.

Parameters

  inStream | The stream which contains the information.

Returns
  status, EC_Normal if successful, an error code otherwise

## ◆ matches()

virtual OFBool DcmElement::matches | ( | const DcmElement & | candidate,
|  | const OFBool | enableWildCardMatching = OFTrue ) const
| virtual

perform attribute matching.

Perform attribute matching on a candidate element using this element as the matching key.

Note
  The given candidate element must refer to the same attribute kind, i.e. have the same tag and VR. The method will return OFFalse if it doesn't.

Parameters

  candidate | the candidate element to compare this element with.
  enableWildCardMatching | enable or disable wild card matching. Defaults to OFTrue, which means wild card matching is performed if the element's VR supports it. Set to OFFalse to force single value matching instead.

Returns
  OFTrue if the candidate matches this element, OFFalse otherwise.

Reimplemented in DcmApplicationEntity, DcmByteString, DcmCharString, DcmCodeString, DcmDate, DcmDateTime, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmSignedLong, DcmSignedShort, DcmTime, DcmUniversalResourceIdentifierOrLocator, DcmUnsignedLong, and DcmUnsignedShort.

References DcmElement().

## ◆ newValueField()

virtual Uint8 * DcmElement::newValueField | ( |  | ) |
| protected virtual

This function creates a byte array of Length bytes and returns this array.

In case Length is odd, an array of Length+1 bytes will be created and Length will be increased by 1.

Returns
  pointer to created byte array

Reimplemented in DcmByteString.

## ◆ operator=()

DcmElement & DcmElement::operator= | ( | const DcmElement & | obj | ) |

assignment operator

Parameters

  obj | element to be assigned/copied

Returns
  reference to this object

References DcmElement().

## ◆ postLoadValue()

virtual void DcmElement::postLoadValue | ( |  | ) |
| protected virtual

performs clean-up functions after loading an attribute value into main memory.

In particular, if dcmEnableAutomaticInputDataCorrection is enabled, silently fixes odd length elements.

Reimplemented in DcmByteString, and DcmOtherByteOtherWord.

## ◆ putFloat32()

virtual OFCondition DcmElement::putFloat32 | ( | const Float32 | val,
|  | const unsigned long | pos = 0 )
| virtual

insert into the element value a copy of the given Float32 value.

If the attribute is multi-valued, all other values remain untouched. Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new value to be inserted
  pos | position for insert operation. Value: pos <= getVM(), i.e. a value can be appended to the end of the current element or inserted within the existing value field.

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmFloatingPointSingle.

## ◆ putFloat32Array()

virtual OFCondition DcmElement::putFloat32Array | ( | const Float32 * | vals,
|  | const unsigned long | num )
| virtual

replace the element value by a copy of the given Float32 array (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  vals | new attribute value
  num | number of values in array vals

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmFloatingPointSingle.

## ◆ putFloat64()

virtual OFCondition DcmElement::putFloat64 | ( | const Float64 | val,
|  | const unsigned long | pos = 0 )
| virtual

insert into the element value a copy of the given Float64 value.

If the attribute is multi-valued, all other values remain untouched. Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new value to be inserted
  pos | position for insert operation. Value: pos <= getVM(), i.e. a value can be appended to the end of the current element or inserted within the existing value field.

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmDecimalString, and DcmFloatingPointDouble.

## ◆ putFloat64Array()

virtual OFCondition DcmElement::putFloat64Array | ( | const Float64 * | vals,
|  | const unsigned long | num )
| virtual

replace the element value by a copy of the given Float64 array (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  vals | new attribute value
  num | number of values in array vals

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmFloatingPointDouble.

## ◆ putOFStringArray()

virtual OFCondition DcmElement::putOFStringArray | ( | const OFString & | val | ) |
| virtual

replace the element value by a copy of the given string (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new attribute value

Returns
  EC_Normal upon success, an error code otherwise

## ◆ putSint16()

virtual OFCondition DcmElement::putSint16 | ( | const Sint16 | val,
|  | const unsigned long | pos = 0 )
| virtual

insert into the element value a copy of the given Sint16 value.

If the attribute is multi-valued, all other values remain untouched. Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new value to be inserted
  pos | position for insert operation. Value: pos <= getVM(), i.e. a value can be appended to the end of the current element or inserted within the existing value field.

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSignedShort.

## ◆ putSint16Array()

virtual OFCondition DcmElement::putSint16Array | ( | const Sint16 * | vals,
|  | const unsigned long | num )
| virtual

replace the element value by a copy of the given Sint16 array (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  vals | new attribute value
  num | number of values in array vals

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSignedShort.

## ◆ putSint32()

virtual OFCondition DcmElement::putSint32 | ( | const Sint32 | val,
|  | const unsigned long | pos = 0 )
| virtual

insert into the element value a copy of the given Sint32 value.

If the attribute is multi-valued, all other values remain untouched. Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new value to be inserted
  pos | position for insert operation. Value: pos <= getVM(), i.e. a value can be appended to the end of the current element or inserted within the existing value field.

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSignedLong.

## ◆ putSint32Array()

virtual OFCondition DcmElement::putSint32Array | ( | const Sint32 * | vals,
|  | const unsigned long | num )
| virtual

replace the element value by a copy of the given Sint32 array (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  vals | new attribute value
  num | number of values in array vals

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmSignedLong.

## ◆ putString() [1/2]

virtual OFCondition DcmElement::putString | ( | const char * | val | ) |
| virtual

replace the element value by a copy of the given string (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new attribute value

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmAttributeTag, DcmByteString, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmOtherByteOtherWord, DcmSigned64bitVeryLong, DcmSignedLong, DcmSignedShort, DcmUniqueIdentifier, DcmUnsigned64bitVeryLong, DcmUnsignedLong, and DcmUnsignedShort.

## ◆ putString() [2/2]

virtual OFCondition DcmElement::putString | ( | const char * | val,
|  | const Uint32 | len )
| virtual

replace the element value by a copy of the given string (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new attribute value
  len | length of the new attribute value (number of characters)

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmAttributeTag, DcmByteString, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmOtherByteOtherWord, DcmSigned64bitVeryLong, DcmSignedLong, DcmSignedShort, DcmUniqueIdentifier, DcmUnsigned64bitVeryLong, DcmUnsignedLong, and DcmUnsignedShort.

## ◆ putTagVal()

virtual OFCondition DcmElement::putTagVal | ( | const DcmTagKey & | attrTag,
|  | const unsigned long | pos = 0 )
| virtual

insert into the element value a copy of the given DcmTagKey value.

If the attribute is multi-valued, all other values remain untouched. Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  attrTag | new value to be inserted
  pos | position for insert operation. Value: pos <= getVM(), i.e. a value can be appended to the end of the current element or inserted within the existing value field.

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmAttributeTag.

## ◆ putUint16()

virtual OFCondition DcmElement::putUint16 | ( | const Uint16 | val,
|  | const unsigned long | pos = 0 )
| virtual

insert into the element value a copy of the given Uint16 value.

If the attribute is multi-valued, all other values remain untouched. Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new value to be inserted
  pos | position for insert operation. Value: pos <= getVM(), i.e. a value can be appended to the end of the current element or inserted within the existing value field.

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmUnsignedShort.

## ◆ putUint16Array()

virtual OFCondition DcmElement::putUint16Array | ( | const Uint16 * | vals,
|  | const unsigned long | num )
| virtual

replace the element value by a copy of the given Uint16 array (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  vals | new attribute value
  num | number of values in array vals

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmAttributeTag, DcmOtherByteOtherWord, DcmPixelData, DcmPolymorphOBOW, and DcmUnsignedShort.

## ◆ putUint32()

virtual OFCondition DcmElement::putUint32 | ( | const Uint32 | val,
|  | const unsigned long | pos = 0 )
| virtual

insert into the element value a copy of the given Uint32 value.

If the attribute is multi-valued, all other values remain untouched. Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  val | new value to be inserted
  pos | position for insert operation. Value: pos <= getVM(), i.e. a value can be appended to the end of the current element or inserted within the existing value field.

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmUnsignedLong.

## ◆ putUint32Array()

virtual OFCondition DcmElement::putUint32Array | ( | const Uint32 * | vals,
|  | const unsigned long | num )
| virtual

replace the element value by a copy of the given Uint32 array (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  vals | new attribute value
  num | number of values in array vals

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmUnsignedLong.

## ◆ putUint8Array()

virtual OFCondition DcmElement::putUint8Array | ( | const Uint8 * | vals,
|  | const unsigned long | num )
| virtual

replace the element value by a copy of the given Uint8 array (which is possibly multi-valued).

Requires element to be of corresponding VR, otherwise an error is returned.

Parameters

  vals | new attribute value
  num | number of values in array vals

Returns
  EC_Normal upon success, an error code otherwise

Reimplemented in DcmOtherByteOtherWord, DcmPixelData, and DcmPolymorphOBOW.

## ◆ putValue()

OFCondition DcmElement::putValue | ( | const void * | value,
|  | const Uint32 | length )
| protected

replace the element value by a copy of the given raw data block

Parameters

  value | new attribute value
  length | length of new attribute value in bytes

Returns
  EC_Normal upon success, an error code otherwise

## ◆ read()

virtual OFCondition DcmElement::read | ( | DcmInputStream & | inStream,
|  | const E_TransferSyntax | ixfer,
|  | const E_GrpLenEncoding | glenc = EGL_noChange,
|  | const Uint32 | maxReadLength = DCM_MaxReadLength )
| virtual

This function reads the data value of an attribute which is captured in the input stream and captures this information in this.

If not all information for an attribute could be read from the stream, the function returns EC_StreamNotifyClient. Note that if certain conditions are met, this function does not actually load the data value but creates and stores an object that enables us to load this information later.

Parameters

  inStream | The stream which contains the information.
  ixfer | The transfer syntax which was used to encode the information in inStream.
  glenc | Encoding type for group length; specifies what will be done with group length tags.
  maxReadLength | Maximum read length for reading an attribute value.

Returns
  status, EC_Normal if successful, an error code otherwise

Implements DcmObject.

Reimplemented in DcmFileFormat, DcmPixelData, DcmPixelSequence, DcmPolymorphOBOW, and DcmSequenceOfItems.

References EGL_noChange.

## ◆ scanValue() [1/2]

static int DcmElement::scanValue | ( | const OFString & | value,
|  | const OFString & | vr,
|  | const size_t | pos = 0,
|  | const size_t | num = OFString_npos )
| static

scan string value for conformance with given value representation (VR)

Parameters

  value | string value to be scanned
  vr | two-character identifier of the VR to be checked (lower case)
  pos | position of the first character to be scanned in 'value'
  num | number of characters to be scanned in 'value' (default: all)

Returns
  numeric identifier of the VR found, 16 in case of unknown VR

## ◆ scanValue() [2/2]

static int DcmElement::scanValue | ( | const OFString & | vr,
|  | const char *const | value,
|  | const size_t | size )
| static

scan string value for conformance with given value representation (VR)

Parameters

  vr | two-character identifier of the VR to be checked (lower case)
  value | string value to be scanned
  size | number of characters to be scanned in 'value'

Returns
  numeric identifier of the VR found, 16 in case of unknown VR

## ◆ setByteOrder()

void DcmElement::setByteOrder | ( | E_ByteOrder | val | ) |
| inline protected

set the current byte order of the value field

Parameters

  val | byte order of the value field

References fByteOrder.

## ◆ swapValueField()

void DcmElement::swapValueField | ( | size_t | valueWidth | ) |
| protected

swaps the content of the value field (if loaded) from big-endian to little-endian or back

Parameters

  valueWidth | width (in bytes) of each element value

## ◆ transferInit()

virtual void DcmElement::transferInit | ( |  | ) |
| virtual

initialize the transfer state of this object.

This method must be called before this object is written to a stream or read (parsed) from a stream.

Reimplemented from DcmObject.

Reimplemented in DcmPixelData, DcmPolymorphOBOW, and DcmSequenceOfItems.

## ◆ valueLoaded()

OFBool DcmElement::valueLoaded | ( |  | ) | const
| inline

check if value of this element is loaded into main memory

Returns
  true if value is present in memory, false if value still resides in file

References fValue, and DcmObject::getLengthField().

## ◆ write()

virtual OFCondition DcmElement::write | ( | DcmOutputStream & | outStream,
|  | const E_TransferSyntax | oxfer,
|  | const E_EncodingType | enctype,
|  | DcmWriteCache * | wcache )
| virtual

This function writes this element's value to the outstream which was passed.

When writing information, the byte ordering (little or big endian) of the transfer syntax which was passed will be accounted for. In case the outstream does not provide enough space for all bytes of the current element's value, only a certain part of the value will be written to the stream. This element's transfer state indicates if the all bytes of value have already been written to the stream (ERW_ready), if the writing is still in progress and more bytes need to be written to the stream (ERW_inWork) or if the writing of the bytes of this element's value has not even begun yet (ERW_init). The member variable fTransferredBytes indicates how many bytes (starting from byte 0) of this element's value have already been written to the stream. This function will return EC_Normal, if the entire value of this element has been written to the stream, it will return EC_StreamNotifyClient, if there is no more space in the buffer and not all bytes of this element's value have been written, and it will return some other (error) value if there was an error.

Parameters

  outStream | The stream the information will be written to.
  oxfer | The transfer syntax which shall be used.
  enctype | encoding types (undefined or explicit length) (actually unused)
  wcache | pointer to write cache object, may be NULL

Returns
  status, EC_Normal if successful, an error code otherwise

Implements DcmObject.

Reimplemented in DcmByteString, DcmFileFormat, DcmOtherByteOtherWord, DcmPixelData, DcmPixelSequence, DcmPolymorphOBOW, and DcmSequenceOfItems.

## ◆ writeJson()

virtual OFCondition DcmElement::writeJson | ( | STD_NAMESPACE ostream & | out,
|  | DcmJsonFormat & | format )
| virtual

write object in JSON format

Parameters

  out | output stream to which the JSON document is written
  format | used to format and customize the output

Returns
  status, EC_Normal if successful, an error code otherwise

Reimplemented from DcmObject.

Reimplemented in DcmAttributeTag, DcmByteString, DcmCharString, DcmDecimalString, DcmFileFormat, DcmFloatingPointDouble, DcmFloatingPointSingle, DcmIntegerString, DcmLongString, DcmOther64bitVeryLong, DcmOtherByteOtherWord, DcmOtherDouble, DcmOtherFloat, DcmOtherLong, DcmPersonName, DcmPixelData, DcmSequenceOfItems, DcmShortString, DcmSigned64bitVeryLong, and DcmUnsigned64bitVeryLong.

## ◆ writeJsonCloser()

virtual void DcmElement::writeJsonCloser | ( | STD_NAMESPACE ostream & | out,
|  | DcmJsonFormat & | format )
| protected virtual

write element end tag in JSON format

Parameters

  out | output stream to which the JSON document is written
  format | used to format the output

## ◆ writeJsonOpener()

virtual void DcmElement::writeJsonOpener | ( | STD_NAMESPACE ostream & | out,
|  | DcmJsonFormat & | format )
| protected virtual

write element start tag in JSON format

Parameters

  out | output stream to which the JSON document is written
  format | used to format the output

## ◆ writeSignatureFormat()

virtual OFCondition DcmElement::writeSignatureFormat | ( | DcmOutputStream & | outStream,
|  | const E_TransferSyntax | oxfer,
|  | const E_EncodingType | enctype,
|  | DcmWriteCache * | wcache )
| virtual

special write method for creation of digital signatures

Parameters

  outStream | DICOM output stream
  oxfer | output transfer syntax
  enctype | encoding types (undefined or explicit length)
  wcache | pointer to write cache object, may be NULL

Returns
  status, EC_Normal if successful, an error code otherwise

Implements DcmObject.

Reimplemented in DcmByteString, DcmOtherByteOtherWord, DcmPixelData, DcmPixelItem, DcmPixelSequence, DcmPolymorphOBOW, and DcmSequenceOfItems.

## ◆ writeXML()

virtual OFCondition DcmElement::writeXML | ( | STD_NAMESPACE ostream & | out,
|  | const size_t | flags = 0 )
| virtual

write object in XML format

Parameters

  out | output stream to which the XML document is written
  flags | optional flag used to customize the output (see DCMTypes::XF_xxx)

Returns
  status, EC_Normal if successful, an error code otherwise

Reimplemented from DcmObject.

Reimplemented in DcmAttributeTag, DcmDecimalString, DcmFileFormat, DcmOther64bitVeryLong, DcmOtherByteOtherWord, DcmOtherDouble, DcmOtherFloat, DcmOtherLong, DcmPersonName, DcmPixelData, DcmPixelItem, DcmPixelSequence, and DcmSequenceOfItems.

## ◆ writeXMLEndTag()

virtual void DcmElement::writeXMLEndTag | ( | STD_NAMESPACE ostream & | out,
|  | const size_t | flags )
| protected virtual

write element end tag in XML format

Parameters

  out | output stream to which the XML end tag is written
  flags | flag used to customize the output (not yet used)

## ◆ writeXMLStartTag()

virtual void DcmElement::writeXMLStartTag | ( | STD_NAMESPACE ostream & | out,
|  | const size_t | flags,
|  | const char * | attrText = NULL )
| protected virtual

write element start tag in XML format

Parameters

  out | output stream to which the XML start tag is written
  flags | flag used to customize the output (not yet used)
  attrText | extra attribute text to be added to the element tag

## Related Definitions

## ◆ operator<

OFBool operator< | ( | const DcmElement & | lhs,
|  | const DcmElement & | rhs )
| friend

Checks whether left hand side element is smaller than right hand side element.

Uses DcmElement's compare() method in order to perform the comparison. See DcmElement::compare() for details.

Parameters

  lhs | left hand side of the comparison
  rhs | right hand side of the comparison

Returns
  OFTrue if lhs is smaller than rhs, OFFalse otherwise

References DcmElement(), and compare().

## ◆ operator<=

OFBool operator<= | ( | const DcmElement & | lhs,
|  | const DcmElement & | rhs )
| friend

Checks whether left hand side element is smaller than or equal to right hand side element.

Uses DcmElement's compare() method in order to perform the comparison. See DcmElement::compare() for details.

Parameters

  lhs | left hand side of the comparison
  rhs | right hand side of the comparison

Returns
  OFTrue if lhs is smaller than rhs or both are equal, OFFalse otherwise

References DcmElement(), and operator<=.

Referenced by operator<=.

## ◆ operator>

OFBool operator> | ( | const DcmElement & | lhs,
|  | const DcmElement & | rhs )
| friend

Checks whether left hand side element is greater than right hand side element.

Uses DcmElement's compare() method in order to perform the comparison. See DcmElement::compare() for details.

Parameters

  lhs | left hand side of the comparison
  rhs | right hand side of the comparison

Returns
  OFTrue if lhs is greater than rhs, OFFalse otherwise

References DcmElement().

## ◆ operator>=

OFBool operator>= | ( | const DcmElement & | lhs,
|  | const DcmElement & | rhs )
| friend

Checks whether left hand side element is greater than or equal to right hand side element.

Uses DcmElement's compare() method in order to perform the comparison. See DcmElement::compare() for details.

Parameters

  lhs | left hand side of the comparison
  rhs | right hand side of the comparison

Returns
  OFTrue if lhs is greater than rhs or both are equal, OFFalse otherwise

References DcmElement(), and operator>=.

Referenced by operator>=.

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

- dcmdata/include/dcmtk/dcmdata/dcelem.h

Generated on Sat Mar 1 2025 for DCMTK Version 3.6.9 by Doxygen 1.13.2