Inheritance diagram for DcmItem:
Public Member Functions | |
DcmItem () | |
default constructor | |
DcmItem (const DcmTag &tag, const Uint32 len=0) | |
constructor. | |
DcmItem (const DcmItem &old) | |
copy constructor | |
virtual | ~DcmItem () |
destructor | |
virtual DcmObject * | clone () const |
clone method | |
virtual DcmEVR | ident () const |
get type identifier | |
virtual unsigned long | getVM () |
get value multiplicity | |
virtual unsigned long | card () const |
virtual OFBool | isLeaf () const |
virtual void | print (ostream &out, const size_t flags=0, const int level=0, const char *pixelFileName=NULL, size_t *pixelCounter=NULL) |
print all elements of the item to a stream | |
virtual Uint32 | calcElementLength (const E_TransferSyntax xfer, const E_EncodingType enctype) |
virtual Uint32 | getLength (const E_TransferSyntax xfer=EXS_LittleEndianImplicit, const E_EncodingType enctype=EET_UndefinedLength) |
virtual void | transferInit () |
virtual void | transferEnd () |
virtual OFBool | canWriteXfer (const E_TransferSyntax newXfer, const E_TransferSyntax oldXfer) |
virtual OFCondition | read (DcmInputStream &inStream, const E_TransferSyntax ixfer, const E_GrpLenEncoding glenc=EGL_noChange, const Uint32 maxReadLength=DCM_MaxReadLength) |
This function reads the information of all attributes which are captured in the input stream and captures this information in elementList. | |
virtual OFCondition | write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype=EET_UndefinedLength) |
write object to a stream | |
virtual OFCondition | writeXML (ostream &out, const size_t flags=0) |
write object in XML format | |
virtual OFCondition | writeSignatureFormat (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype=EET_UndefinedLength) |
special write method for creation of digital signatures | |
virtual OFBool | containsUnknownVR () const |
returns true if the object contains an element with Unknown VR at any nesting level | |
virtual OFCondition | insert (DcmElement *elem, OFBool replaceOld=OFFalse, OFBool checkInsertOrder=OFFalse) |
insert a new element into the list of elements maintained by this item. | |
virtual DcmElement * | getElement (const unsigned long num) |
virtual OFCondition | nextObject (DcmStack &stack, const OFBool intoSub) |
virtual DcmObject * | nextInContainer (const DcmObject *obj) |
virtual DcmElement * | remove (const unsigned long num) |
virtual DcmElement * | remove (DcmObject *elem) |
virtual DcmElement * | remove (const DcmTagKey &tag) |
virtual OFCondition | clear () |
virtual OFCondition | verify (const OFBool autocorrect=OFFalse) |
virtual OFCondition | search (const DcmTagKey &xtag, DcmStack &resultStack, E_SearchMode mode=ESM_fromHere, OFBool searchIntoSub=OFTrue) |
virtual OFCondition | searchErrors (DcmStack &resultStack) |
virtual OFCondition | loadAllDataIntoMemory () |
virtual OFCondition | computeGroupLengthAndPadding (const E_GrpLenEncoding glenc, const E_PaddingEncoding padenc=EPD_noChange, const E_TransferSyntax xfer=EXS_Unknown, const E_EncodingType enctype=EET_ExplicitLength, const Uint32 padlen=0, const Uint32 subPadlen=0, Uint32 instanceLength=0) |
This function takes care of group length and padding elements in the current element list according to what is specified in glenc and padenc. | |
OFBool | tagExists (const DcmTagKey &key, OFBool searchIntoSub=OFFalse) |
OFBool | tagExistsWithValue (const DcmTagKey &key, OFBool searchIntoSub=OFFalse) |
OFCondition | findAndGetElement (const DcmTagKey &tagKey, DcmElement *&element, const OFBool searchIntoSub=OFFalse) |
find element and get a pointer to it. | |
OFCondition | findAndGetElements (const DcmTagKey &tagKey, DcmStack &resultStack) |
find all elements matching a particular tag and return references to them on a stack. | |
OFCondition | findAndGetString (const DcmTagKey &tagKey, const char *&value, const OFBool searchIntoSub=OFFalse) |
find element and get value as a reference to a C string. | |
OFCondition | findAndGetOFString (const DcmTagKey &tagKey, OFString &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as a C++ string (only one component). | |
OFCondition | findAndGetOFStringArray (const DcmTagKey &tagKey, OFString &value, const OFBool searchIntoSub=OFFalse) |
find element and get value as a C++ string (all components). | |
OFCondition | findAndGetUint8 (const DcmTagKey &tagKey, Uint8 &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as an unsigned 8-bit integer. | |
OFCondition | findAndGetUint8Array (const DcmTagKey &tagKey, const Uint8 *&value, unsigned long *count=NULL, const OFBool searchIntoSub=OFFalse) |
find element and get value as an array of unsigned 8-bit integers. | |
OFCondition | findAndGetUint16 (const DcmTagKey &tagKey, Uint16 &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as an unsigned 16-bit integer. | |
OFCondition | findAndGetUint16Array (const DcmTagKey &tagKey, const Uint16 *&value, unsigned long *count=NULL, const OFBool searchIntoSub=OFFalse) |
find element and get value as an array of unsigned 16-bit integers. | |
OFCondition | findAndGetSint16 (const DcmTagKey &tagKey, Sint16 &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as a signed 16-bit integer. | |
OFCondition | findAndGetSint16Array (const DcmTagKey &tagKey, const Sint16 *&value, unsigned long *count=NULL, const OFBool searchIntoSub=OFFalse) |
find element and get value as an array of signed 16-bit integers. | |
OFCondition | findAndGetUint32 (const DcmTagKey &tagKey, Uint32 &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as an unsigned 32-bit integer. | |
OFCondition | findAndGetUint32Array (const DcmTagKey &tagKey, const Uint32 *&value, unsigned long *count=NULL, const OFBool searchIntoSub=OFFalse) |
find element and get value as an array of unsigned 32-bit integers. | |
OFCondition | findAndGetSint32 (const DcmTagKey &tagKey, Sint32 &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as a signed 32-bit integer. | |
OFCondition | findAndGetSint32Array (const DcmTagKey &tagKey, const Sint32 *&value, unsigned long *count=NULL, const OFBool searchIntoSub=OFFalse) |
find element and get value as an array of signed 32-bit integers. | |
OFCondition | findAndGetLongInt (const DcmTagKey &tagKey, long int &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as a (signed) long integer. | |
OFCondition | findAndGetFloat32 (const DcmTagKey &tagKey, Float32 &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as a 32-bit floating point. | |
OFCondition | findAndGetFloat32Array (const DcmTagKey &tagKey, const Float32 *&value, unsigned long *count=NULL, const OFBool searchIntoSub=OFFalse) |
find element and get value as an array of 32-bit floating point values. | |
OFCondition | findAndGetFloat64 (const DcmTagKey &tagKey, Float64 &value, const unsigned long pos=0, const OFBool searchIntoSub=OFFalse) |
find element and get value as a 64-bit floating point. | |
OFCondition | findAndGetFloat64Array (const DcmTagKey &tagKey, const Float64 *&value, unsigned long *count=NULL, const OFBool searchIntoSub=OFFalse) |
find element and get value as an array of 64-bit floating point values. | |
OFCondition | findAndGetSequence (const DcmTagKey &seqTagKey, DcmSequenceOfItems *&sequence, const OFBool searchIntoSub=OFFalse) |
looks up and returns a given sequence. | |
OFCondition | findAndGetSequenceItem (const DcmTagKey &seqTagKey, DcmItem *&item, const signed long itemNum=0) |
looks up and returns a given sequence item, if it exists. | |
OFCondition | findOrCreateSequenceItem (const DcmTag &seqTag, DcmItem *&item, const signed long itemNum=0) |
looks up the given sequence in the current dataset and returns the given item. | |
OFCondition | findAndDeleteElement (const DcmTagKey &tagKey, const OFBool allOccurrences=OFFalse, const OFBool searchIntoSub=OFFalse) |
find element, remove it from the dataset and free the associated memory. | |
OFCondition | findAndCopyElement (const DcmTagKey &tagKey, DcmElement *&newElement, const OFBool searchIntoSub=OFFalse) |
find element, and create a copy of it. | |
OFCondition | putAndInsertString (const DcmTag &tag, const char *value, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertOFStringArray (const DcmTag &tag, const OFString &value, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertUint8Array (const DcmTag &tag, const Uint8 *value, const unsigned long count, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertUint16 (const DcmTag &tag, const Uint16 value, const unsigned long pos=0, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertUint16Array (const DcmTag &tag, const Uint16 *value, const unsigned long count, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertSint16 (const DcmTag &tag, const Sint16 value, const unsigned long pos=0, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertSint16Array (const DcmTag &tag, const Sint16 *value, const unsigned long count, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertUint32 (const DcmTag &tag, const Uint32 value, const unsigned long pos=0, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertSint32 (const DcmTag &tag, const Sint32 value, const unsigned long pos=0, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertFloat32 (const DcmTag &tag, const Float32 value, const unsigned long pos=0, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | putAndInsertFloat64 (const DcmTag &tag, const Float64 value, const unsigned long pos=0, const OFBool replaceOld=OFTrue) |
create a new element, put specified value to it and insert the element into the dataset/item. | |
OFCondition | insertEmptyElement (const DcmTag &tag, const OFBool replaceOld=OFTrue) |
create a new element (with no value) and insert it into the dataset/item. | |
Protected Member Functions | |
OFCondition | readTagAndLength (DcmInputStream &inStream, const E_TransferSyntax xfer, DcmTag &tag, Uint32 &length, Uint32 &bytesRead) |
This function reads tag and length information from inStream and returns this information to the caller. | |
OFCondition | readSubElement (DcmInputStream &inStream, DcmTag &newTag, const Uint32 newLength, const E_TransferSyntax xfer, const E_GrpLenEncoding glenc, const Uint32 maxReadLength=DCM_MaxReadLength) |
This function creates a new DcmElement object on the basis of the newTag and newLength information which was passed, inserts this new element into elementList, reads the actual data value which belongs to this element (attribute) from the inStream and also assigns this information to the object which was created at the beginning. | |
E_TransferSyntax | checkTransferSyntax (DcmInputStream &inStream) |
This function reads the first 6 bytes from the input stream and determines the transfer syntax which was used to code the information in the stream. | |
Protected Attributes | |
DcmList * | elementList |
the list of elements maintained by this object | |
OFBool | lastElementComplete |
flag used during suspended I/O. | |
Uint32 | fStartPosition |
used during reading. | |
Private Member Functions | |
DcmItem & | operator= (const DcmItem &) |
private unimplemented copy assignment operator | |
OFCondition | searchSubFromHere (const DcmTagKey &tag, DcmStack &resultStack, OFBool searchIntoSub) |
OFBool | foundVR (char *atposition) |
Private Attributes | |
DcmPrivateTagCache | privateCreatorCache |
cache for private creator tags and names |
Definition at line 54 of file dcitem.h.
|
constructor. Create new item from given tag and length.
|
|
copy constructor
|
|
This function reads the first 6 bytes from the input stream and determines the transfer syntax which was used to code the information in the stream. The decision is based on two questions: a) Did we encounter a valid tag? and b) Do the last 2 bytes which were read from the stream represent a valid VR? In certain special cases, where the transfer syntax cannot be determined without doubt, we want to guess the most likely transfer syntax (see code).
|
|
clone method
Implements DcmObject. Reimplemented in DcmDataset, DcmDirectoryRecord, and DcmMetaInfo. Definition at line 84 of file dcitem.h. References DcmItem(). |
|
This function takes care of group length and padding elements in the current element list according to what is specified in glenc and padenc. If required, this function does the following two things: a) it calculates the group length of all groups which are contained in this item and sets the calculated values in the corresponding group length elements and b) it inserts a corresponding padding element (or, in case of sequences: padding elements) with a corresponding correct size into the element list.
|
|
returns true if the object contains an element with Unknown VR at any nesting level
Reimplemented from DcmObject. |
|
find element, and create a copy of it. Applicable to all DICOM value representations (VR).
|
|
find element, remove it from the dataset and free the associated memory. Applicable to all DICOM value representations (VR).
|
|
find element and get a pointer to it. Applicable to all DICOM value representations (VR). The result variable 'element' is automatically set to NULL if an error occurs.
|
|
find all elements matching a particular tag and return references to them on a stack. This functions always performs a deep search (i.e. searches into sequence of items).
|
|
find element and get value as a 32-bit floating point. Applicable to the following VRs: FL, OF The result variable 'value' is automatically set to zero if an error occurs.
|
|
find element and get value as an array of 32-bit floating point values. Applicable to the following VRs: FL, OF The result variable 'value' is automatically set to NULL if an error occurs.
|
|
find element and get value as a 64-bit floating point. Applicable to the following VRs: DS, FD The result variable 'value' is automatically set to zero if an error occurs.
|
|
find element and get value as an array of 64-bit floating point values. Applicable to the following VRs: FD The result variable 'value' is automatically set to NULL if an error occurs.
|
|
find element and get value as a (signed) long integer. Applicable to the following VRs: IS, SL, SS, UL, US The result variable 'value' is automatically set to zero if an error occurs.
|
|
find element and get value as a C++ string (only one component). Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OF, OW, PN, SH, SL, SS, ST, TM, UI, UL, US, UT Since the getOFString() routine is called internally the resulting string is normalized, i.e. leading and/or trailing spaces are removed according to the associated value representation, or the element value is converted to a character string (for non-string VRs) - see documentation in the corresponding header file. In contrast to the above and below function only the specified component (see parameter 'pos') is returned. The result variable 'value' is automatically set to an empty string if an error occurs.
|
|
find element and get value as a C++ string (all components). Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OF, OW, PN, SH, SL, SS, ST, TM, UI, UL, US, UT Since the getOFStringArray() routine is called internally the resulting string is normalized, i.e. leading and/or trailing spaces are removed according to the associated value representation or the element values are converted to character strings (for non-string VRs) - see documentation in the corresponding header file. The result variable 'value' is automatically set to an empty string if an error occurs.
|
|
looks up and returns a given sequence. Applicable to the following VRs: SQ, (pixelSQ) The result variable 'sequence' is automatically set to NULL if an error occurs (e.g. if 'seqTagKey' does not refer to a sequence attribute).
|
|
looks up and returns a given sequence item, if it exists. Otherwise sets 'item' to NULL and returns EC_TagNotFound (specified sequence does not exist) or EC_IllegalParameter (specified item does not exist). Only the top-most level of the dataset/item is examined (i.e. no deep-search is performed). Applicable to the following VRs: SQ, (pixelSQ)
|
|
find element and get value as a signed 16-bit integer. Applicable to the following VRs: SS The result variable 'value' is automatically set to zero if an error occurs.
|
|
find element and get value as an array of signed 16-bit integers. Applicable to the following VRs: SS The result variable 'value' is automatically set to NULL if an error occurs.
|
|
find element and get value as a signed 32-bit integer. Applicable to the following VRs: IS, SL The result variable 'value' is automatically set to zero if an error occurs.
|
|
find element and get value as an array of signed 32-bit integers. Applicable to the following VRs: SL The result variable 'value' is automatically set to NULL if an error occurs.
|
|
find element and get value as a reference to a C string. Applicable to the following VRs: AE, AS, CS, DA, DS, DT, IS, LO, LT, PN, SH, ST, TM, UI, UT Since the getString() routine is called internally the resulting string reference represents the (possibly multi-valued) value as stored in the dataset, i.e. no normalization is performed. The result variable 'value' is automatically set to NULL if an error occurs.
|
|
find element and get value as an unsigned 16-bit integer. Applicable to the following VRs: OW, US The result variable 'value' is automatically set to zero if an error occurs.
|
|
find element and get value as an array of unsigned 16-bit integers. Applicable to the following VRs: AT, OW, US The result variable 'value' is automatically set to NULL if an error occurs.
|
|
find element and get value as an unsigned 32-bit integer. Applicable to the following VRs: UL The result variable 'value' is automatically set to zero if an error occurs.
|
|
find element and get value as an array of unsigned 32-bit integers. Applicable to the following VRs: UL The result variable 'value' is automatically set to NULL if an error occurs.
|
|
find element and get value as an unsigned 8-bit integer. Applicable to the following VRs: OB The result variable 'value' is automatically set to zero if an error occurs.
|
|
find element and get value as an array of unsigned 8-bit integers. Applicable to the following VRs: OB The result variable 'value' is automatically set to NULL if an error occurs.
|
|
looks up the given sequence in the current dataset and returns the given item. If either the sequence or the item do not exist, they are created. If necessary, multiple empty items are inserted. Only the top-most level of the dataset/item is examined (i.e. no deep-search is performed). Applicable to the following VRs: SQ, (pixelSQ)
|
|
get value multiplicity
Implements DcmObject. |
|
get type identifier
Implements DcmObject. Reimplemented in DcmDataset, and DcmMetaInfo. |
|
insert a new element into the list of elements maintained by this item. The list of elements is always kept in ascending tag order.
|
|
create a new element (with no value) and insert it into the dataset/item. Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, OB, OF, OW, LT, PN, SH, SQ, ST, TM, UI, UT
|
|
print all elements of the item to a stream
Implements DcmObject. Reimplemented in DcmDataset, and DcmMetaInfo. |
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: FL, OF
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: FD
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: AE, AS, CS, DA, DS, DT, IS, LO, LT, PN, SH, ST, TM, UI, UT
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: SS, xs (US or SS)
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: SS, xs (US or SS)
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: SL
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OF, OW, PN, SH, SL, SS, ST, TM, UI, UL, US, UT
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: US, xs (US or SS)
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: AT, OW, US, ox (polymorph OB/OW or pixel data), xs (US or SS)
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: UL
|
|
create a new element, put specified value to it and insert the element into the dataset/item. Applicable to the following VRs: OB, ox (polymorph OB/OW or pixel data)
|
|
This function reads the information of all attributes which are captured in the input stream and captures this information in elementList. Each attribute is represented as an element in this list. If not all information for an attribute could be read from the stream, the function returns EC_StreamNotifyClient.
Implements DcmObject. Reimplemented in DcmDataset. |
|
This function creates a new DcmElement object on the basis of the newTag and newLength information which was passed, inserts this new element into elementList, reads the actual data value which belongs to this element (attribute) from the inStream and also assigns this information to the object which was created at the beginning.
|
|
This function reads tag and length information from inStream and returns this information to the caller. When reading information, the transfer syntax which was passed is accounted for. If the transfer syntax shows an explicit value representation, the data type of this object is also read from the stream. In general, this function follows the rules which are specified in the DICOM standard (see DICOM standard (year 2000) part 5, section 7) (or the corresponding section in a later version of the standard) concerning the encoding of a dataset.
|
|
write object to a stream
Implements DcmObject. Reimplemented in DcmDataset, and DcmMetaInfo. |
|
special write method for creation of digital signatures
Implements DcmObject. Reimplemented in DcmDataset. |
|
write object in XML format
Reimplemented from DcmObject. Reimplemented in DcmDataset, and DcmMetaInfo. |
|
used during reading. Contains the position in the stream where the item started (needed for calculating the remaining number of bytes available for a fixed-length item). |
|
flag used during suspended I/O. Indicates whether the last element was completely or only partially read/written during the last call to read/write. |