Inheritance diagram for DcmSequenceOfItems:
Public Member Functions | |
DcmSequenceOfItems (const DcmTag &tag, const Uint32 len=0, OFBool readAsUN=OFFalse) | |
constructor | |
DcmSequenceOfItems (const DcmSequenceOfItems &oldSeq) | |
copy constructor | |
virtual | ~DcmSequenceOfItems () |
destructor | |
DcmSequenceOfItems & | operator= (const DcmSequenceOfItems &obj) |
copy assignment operator | |
OFCondition | error () const |
returns current status flag | |
virtual DcmObject * | clone () const |
clone method | |
virtual OFCondition | copyFrom (const DcmObject &rhs) |
Virtual object copying. | |
virtual DcmEVR | ident () const |
return identifier for this class. | |
virtual OFBool | isLeaf () const |
check if this element is a leaf node in a dataset tree. | |
virtual void | print (STD_NAMESPACE ostream &out, const size_t flags=0, const int level=0, const char *pixelFileName=NULL, size_t *pixelCounter=NULL) |
print object to a stream | |
virtual OFCondition | checkValue (const OFString &card="1-n", const OFBool oldFormat=OFFalse) |
check whether stored value conforms to the VR and to the specified VM | |
virtual unsigned long | getVM () |
get value multiplicity | |
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. | |
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 void | transferInit () |
initialize the transfer state of this object. | |
virtual void | transferEnd () |
finalize the transfer state of this object. | |
virtual OFBool | canWriteXfer (const E_TransferSyntax oldXfer, const E_TransferSyntax newXfer) |
check if this DICOM object can be encoded in the given transfer syntax. | |
virtual OFCondition | read (DcmInputStream &inStream, const E_TransferSyntax xfer, 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, DcmWriteCache *wcache) |
write object to a stream | |
virtual OFCondition | writeXML (STD_NAMESPACE 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, DcmWriteCache *wcache) |
special write method for creation of digital signatures | |
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 at any nesting level | |
virtual OFBool | isAffectedBySpecificCharacterSet () const |
check if this object is affected by SpecificCharacterSet at any nesting level. | |
virtual unsigned long | card () |
get cardinality of this sequence | |
virtual OFCondition | prepend (DcmItem *item) |
insert the given item at the start of the item list maintained by this sequence. | |
virtual OFCondition | insert (DcmItem *item, unsigned long where=DCM_EndOfListIndex, OFBool before=OFFalse) |
insert the given item at the given position within the item list maintained by this sequence. | |
virtual OFCondition | append (DcmItem *item) |
insert the given item at the end of the item list maintained by this sequence. | |
virtual OFCondition | insertAtCurrentPos (DcmItem *item, OFBool before=OFFalse) |
insert new item a current position. | |
virtual DcmItem * | getItem (const unsigned long num) |
access an item from the sequence. | |
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 DcmObject * | nextInContainer (const DcmObject *obj) |
this method is only used in container classes, that is, DcmItem and DcmSequenceOfItems. | |
virtual DcmItem * | remove (const unsigned long num) |
remove item from list. | |
virtual DcmItem * | remove (DcmItem *item) |
remove item from list. | |
virtual OFBool | isEmpty (const OFBool normalize=OFTrue) |
check if this sequence is empty | |
virtual OFCondition | clear () |
clear (remove) attribute value | |
virtual OFCondition | verify (const OFBool autocorrect=OFFalse) |
check the currently stored element value | |
virtual OFCondition | search (const DcmTagKey &xtag, DcmStack &resultStack, E_SearchMode mode=ESM_fromHere, OFBool searchIntoSub=OFTrue) |
a complex, stack-based, hierarchical search method. | |
virtual OFCondition | loadAllDataIntoMemory (void) |
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 | 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. | |
Protected Member Functions | |
virtual OFCondition | readTagAndLength (DcmInputStream &inStream, const E_TransferSyntax xfer, DcmTag &tag, Uint32 &length) |
This function reads tag and length information from inStream and returns this information to the caller. | |
virtual OFCondition | makeSubObject (DcmObject *&subObject, const DcmTag &newTag, const Uint32 newLength) |
helper function for read(). | |
OFCondition | readSubItem (DcmInputStream &inStream, const DcmTag &newTag, const Uint32 newLength, const E_TransferSyntax xfer, const E_GrpLenEncoding glenc, const Uint32 maxReadLength=DCM_MaxReadLength) |
helper function for read(). | |
virtual OFCondition | searchSubFromHere (const DcmTagKey &tag, DcmStack &resultStack, const OFBool searchIntoSub) |
helper function for search(). | |
Protected Attributes | |
DcmList * | itemList |
the list of items maintained by this sequence object | |
Static Private Member Functions | |
static OFCondition | writeTagAndVR (DcmOutputStream &outStream, const DcmTag &tag, DcmEVR vr, const E_TransferSyntax oxfer) |
static helper method used in writeSignatureFormat(). | |
Private Attributes | |
OFBool | lastItemComplete |
flag used during suspended I/O. | |
offile_off_t | fStartPosition |
used during reading. | |
OFBool | readAsUN_ |
true if this sequence has been instantiated while reading an UN element with undefined length |
This class is derived from class DcmElement (and not from DcmObject) despite the fact that sequences have no value field as such, they maintain a list of items. However, all APIs in class DcmItem and class DcmDataset accept DcmElements. This is ugly and causes some DcmElement API methods to be useless with DcmSequence.
Definition at line 47 of file dcsequen.h.
DcmSequenceOfItems::DcmSequenceOfItems | ( | const DcmTag & | tag, | |
const Uint32 | len = 0 , |
|||
OFBool | readAsUN = OFFalse | |||
) |
constructor
tag | attribute tag | |
len | length of the attribute value | |
readAsUN | flag indicating whether the sequence should be read (interpreted) as a UN element with Implicit VR Little Endian encoding |
Referenced by clone().
DcmSequenceOfItems::DcmSequenceOfItems | ( | const DcmSequenceOfItems & | oldSeq | ) |
copy constructor
oldSeq | element to be copied |
DcmSequenceOfItems& DcmSequenceOfItems::operator= | ( | const DcmSequenceOfItems & | obj | ) |
copy assignment operator
obj | element to be copied |
virtual DcmObject* DcmSequenceOfItems::clone | ( | ) | const [inline, virtual] |
clone method
Implements DcmObject.
Reimplemented in DcmFileFormat, and DcmPixelSequence.
Definition at line 80 of file dcsequen.h.
References DcmSequenceOfItems().
virtual OFCondition DcmSequenceOfItems::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.
rhs | - [in] The instance to copy from. Has to be of the same class type as "this" object |
Reimplemented from DcmElement.
Reimplemented in DcmFileFormat, and DcmPixelSequence.
virtual DcmEVR DcmSequenceOfItems::ident | ( | void | ) | const [inline, virtual] |
return identifier for this class.
Every class derived from this class returns a unique value of type enum DcmEVR for this call. This is used as a "poor man's RTTI" to correctly identify instances derived from this class even on compilers not supporting RTTI.
Implements DcmObject.
Reimplemented in DcmFileFormat, and DcmPixelSequence.
Definition at line 105 of file dcsequen.h.
virtual OFBool DcmSequenceOfItems::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.
Reimplemented from DcmElement.
Definition at line 113 of file dcsequen.h.
virtual void DcmSequenceOfItems::print | ( | STD_NAMESPACE ostream & | out, | |
const size_t | flags = 0 , |
|||
const int | level = 0 , |
|||
const char * | pixelFileName = NULL , |
|||
size_t * | pixelCounter = NULL | |||
) | [virtual] |
print object to a stream
out | output stream | |
flags | optional flag used to customize the output (see DCMTypes::PF_xxx) | |
level | current level of nested items. Used for indentation. | |
pixelFileName | not used (used in certain sub-classes of this class) | |
pixelCounter | not used (used in certain sub-classes of this class) |
Implements DcmObject.
Reimplemented in DcmFileFormat, and DcmPixelSequence.
virtual OFCondition DcmSequenceOfItems::checkValue | ( | const OFString & | card = "1-n" , |
|
const OFBool | oldFormat = OFFalse | |||
) | [virtual] |
check whether stored value conforms to the VR and to the specified VM
card | cardinality (number of items) to be checked for. (valid values: "1", "1-2", "1-3", "1-8", "1-99", "1-n", "2", "2-n", "2-2n", "3", "3-n", "3-3n", "4", "6", "9", "16", "32"), parameter used to specify the value multiplicity for non-sequence attributes | |
oldFormat | parameter not used for this VR (only for DA, TM, PN) |
Reimplemented from DcmElement.
virtual unsigned long DcmSequenceOfItems::getVM | ( | ) | [inline, virtual] |
get value multiplicity
Implements DcmObject.
Definition at line 142 of file dcsequen.h.
virtual OFCondition DcmSequenceOfItems::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 | |||
) | [virtual] |
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.
glenc | Encoding type for group length; specifies what shall be done with group length tags. | |
padenc | Encoding type for padding; specifies what shall be done with padding tags. | |
xfer | The transfer syntax that shall be used. | |
enctype | Encoding type for sequences; specifies how sequences will be handled. | |
padlen | The length up to which the dataset shall be padded, if padding is desired. | |
subPadlen | For sequences (ie sub elements), the length up to which item shall be padded, if padding is desired. | |
instanceLength | Number of extra bytes added to the item/dataset length used when computing the padding; this parameter is for instance used to pass the length of the file meta header from the DcmFileFormat to the DcmDataset object. |
virtual Uint32 DcmSequenceOfItems::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. If length encodig is set to be explicit and the total sequence size is larger than the available 32-bit length field, then undefined length is returned. If "dcmWriteOversizedSeqsAndItemsUndefined" is disabled, also the internal DcmObject errorFlag is set to EC_SeqOrItemContentOverflow in case the sequence content (excluding tag header etc.) is already too large.
xfer | transfer syntax for length calculation | |
enctype | sequence encoding type for length calculation |
Reimplemented from DcmElement.
Reimplemented in DcmFileFormat, and DcmPixelSequence.
virtual Uint32 DcmSequenceOfItems::getLength | ( | const E_TransferSyntax | xfer = EXS_LittleEndianImplicit , |
|
const E_EncodingType | enctype = EET_UndefinedLength | |||
) | [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.
If length encodig is set to be explicit and the total sequence size is larger than the available 32-bit length field, then undefined length is returned. If "dcmWriteOversizedSeqsAndItemsImplicit" is disabled, also the internal DcmObject errorFlag is set to EC_SeqOrItemContentOverflow.
xfer | transfer syntax for length calculation | |
enctype | sequence encoding type for length calculation |
Reimplemented from DcmElement.
virtual void DcmSequenceOfItems::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 DcmElement.
virtual void DcmSequenceOfItems::transferEnd | ( | ) | [virtual] |
finalize the transfer state of this object.
This method must be called when reading/writing this object from/to a stream has been completed.
Reimplemented from DcmObject.
virtual OFBool DcmSequenceOfItems::canWriteXfer | ( | const E_TransferSyntax | oldXfer, | |
const E_TransferSyntax | newXfer | |||
) | [virtual] |
check if this DICOM object can be encoded in the given transfer syntax.
newXfer | transfer syntax in which the DICOM object is to be encoded | |
oldXfer | transfer syntax in which the DICOM object was read or created. |
Reimplemented from DcmElement.
Reimplemented in DcmFileFormat, and DcmPixelSequence.
virtual OFCondition DcmSequenceOfItems::read | ( | DcmInputStream & | inStream, | |
const E_TransferSyntax | xfer, | |||
const E_GrpLenEncoding | glenc = EGL_noChange , |
|||
const Uint32 | maxReadLength = DCM_MaxReadLength | |||
) | [virtual] |
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.
inStream | The stream which contains the information. | |
xfer | 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. |
Reimplemented from DcmElement.
Reimplemented in DcmFileFormat, and DcmPixelSequence.
virtual OFCondition DcmSequenceOfItems::write | ( | DcmOutputStream & | outStream, | |
const E_TransferSyntax | oxfer, | |||
const E_EncodingType | enctype, | |||
DcmWriteCache * | wcache | |||
) | [virtual] |
write object to a stream
outStream | DICOM output stream | |
oxfer | output transfer syntax | |
enctype | encoding types (undefined or explicit length) | |
wcache | pointer to write cache object, may be NULL |
Reimplemented from DcmElement.
Reimplemented in DcmFileFormat, and DcmPixelSequence.
virtual OFCondition DcmSequenceOfItems::writeXML | ( | STD_NAMESPACE ostream & | out, | |
const size_t | flags = 0 | |||
) | [virtual] |
write object in XML format
out | output stream to which the XML document is written | |
flags | optional flag used to customize the output (see DCMTypes::XF_xxx) |
Reimplemented from DcmElement.
Reimplemented in DcmFileFormat.
virtual OFCondition DcmSequenceOfItems::writeSignatureFormat | ( | DcmOutputStream & | outStream, | |
const E_TransferSyntax | oxfer, | |||
const E_EncodingType | enctype, | |||
DcmWriteCache * | wcache | |||
) | [virtual] |
special write method for creation of digital signatures
outStream | DICOM output stream | |
oxfer | output transfer syntax | |
enctype | encoding types (undefined or explicit length) | |
wcache | pointer to write cache object, may be NULL |
Reimplemented from DcmElement.
Reimplemented in DcmPixelSequence.
virtual OFBool DcmSequenceOfItems::isSignable | ( | ) | const [virtual] |
returns true if the current object may be included in a digital signature
Reimplemented from DcmObject.
virtual OFBool DcmSequenceOfItems::containsUnknownVR | ( | ) | const [virtual] |
returns true if the object contains an element with Unknown VR at any nesting level
Reimplemented from DcmObject.
virtual OFBool DcmSequenceOfItems::containsExtendedCharacters | ( | const OFBool | checkAllStrings = OFFalse |
) | [virtual] |
check if this object contains non-ASCII characters at any nesting level
checkAllStrings | if true, also check elements with string values not affected by SpecificCharacterSet (0008,0005), default: only check PN, LO, LT, SH, ST, UT |
Reimplemented from DcmObject.
virtual OFBool DcmSequenceOfItems::isAffectedBySpecificCharacterSet | ( | ) | const [virtual] |
check if this object is affected by SpecificCharacterSet at any nesting level.
In detail, it is checked whether this object contains any data elements that according to their VR are affected by the SpecificCharacterSet (0008,0005) element. This is true for the following VRs: PN, LO, LT, SH, ST and UT
Reimplemented from DcmObject.
virtual unsigned long DcmSequenceOfItems::card | ( | ) | [virtual] |
get cardinality of this sequence
Referenced by DSRDocumentTreeNode::isSigned().
virtual OFCondition DcmSequenceOfItems::prepend | ( | DcmItem * | item | ) | [virtual] |
insert the given item at the start of the item list maintained by this sequence.
Ownership of the item, which must be allocated on the heap, is transferred to the sequence.
item | pointer to DcmItem instance allocated on the heap, must not be NULL. |
virtual OFCondition DcmSequenceOfItems::insert | ( | DcmItem * | item, | |
unsigned long | where = DCM_EndOfListIndex , |
|||
OFBool | before = OFFalse | |||
) | [virtual] |
insert the given item at the given position within the item list maintained by this sequence.
Ownership of the item, which must be allocated on the heap, is transferred to the sequence.
item | pointer to DcmItem instance allocated on the heap, must not be NULL. | |
where | index of the item after or before which the new item is to be inserted. Value must be < card() or equal to DCM_EndOfListIndex. | |
before | indicates whether the new item should be inserted before or after the item identified by "where" |
Reimplemented in DcmPixelSequence.
virtual OFCondition DcmSequenceOfItems::append | ( | DcmItem * | item | ) | [virtual] |
insert the given item at the end of the item list maintained by this sequence.
Ownership of the item, which must be allocated on the heap, is transferred to the sequence.
item | pointer to DcmItem instance allocated on the heap, must not be NULL. |
virtual OFCondition DcmSequenceOfItems::insertAtCurrentPos | ( | DcmItem * | item, | |
OFBool | before = OFFalse | |||
) | [virtual] |
insert new item a current position.
The current position is stored internally in the 'itemList' member variable.
item | new item to be inserted | |
before | flag indicating whether to insert the item before (OFFalse) or after (OFTrue) the current position |
virtual DcmItem* DcmSequenceOfItems::getItem | ( | const unsigned long | num | ) | [virtual] |
access an item from the sequence.
This method returns a pointer to one of the items in the list, and not a copy.
num | index number of item, must be < card() |
Reimplemented in DcmPixelSequence.
virtual OFCondition DcmSequenceOfItems::nextObject | ( | DcmStack & | stack, | |
const OFBool | intoSub | |||
) | [virtual] |
this method enables a stack based, depth-first traversal of a complete hierarchical DICOM dataset (that is, classes derived from DcmItem or DcmSequenceOfItems).
With each call of this method, the next object in the tree is located and marked on the stack.
stack | "cursor" for current position in the dataset. The stack will contain a pointer to each dataset, sequence, item and element from the main dataset down to the current element, and is updated upon each call to this method. An empty stack is equivalent to a stack containing a pointer to this object only. | |
intoSub | if true, the nextObject method will perform a hierarchical search through the dataset (depth-first), if false, only the current container object will be traversed (e.g., all elements of an item or all items of a sequence). |
Reimplemented from DcmObject.
this method is only used in container classes, that is, DcmItem and DcmSequenceOfItems.
It returns a pointer to the next object in the list AFTER the given object. If the caller passes NULL, a pointer to the first object in the list is returned. If the given object is not found, the given object is the last one in the list or the list is empty, NULL is returned.
obj | pointer to one object in the container; we are looking for the next entry after this one. NULL if looking for the first entry. |
Reimplemented from DcmObject.
virtual DcmItem* DcmSequenceOfItems::remove | ( | const unsigned long | num | ) | [virtual] |
remove item from list.
If found, the item is not deleted but returned to the caller who is responsible for further management of the DcmItem object.
num | index number of item, must be < card() |
Reimplemented in DcmFileFormat, and DcmPixelSequence.
remove item from list.
If found, the item is not deleted but returned to the caller who is responsible for further management of the DcmItem object.
item | pointer to item to be removed from list |
Reimplemented in DcmFileFormat, and DcmPixelSequence.
virtual OFBool DcmSequenceOfItems::isEmpty | ( | const OFBool | normalize = OFTrue |
) | [virtual] |
check if this sequence is empty
normalize | not used for this class |
Reimplemented from DcmObject.
virtual OFCondition DcmSequenceOfItems::clear | ( | ) | [virtual] |
clear (remove) attribute value
Reimplemented from DcmElement.
Reimplemented in DcmFileFormat.
virtual OFCondition DcmSequenceOfItems::verify | ( | const OFBool | autocorrect = OFFalse |
) | [virtual] |
check the currently stored element value
autocorrect | correct value length if OFTrue |
Implements DcmObject.
virtual OFCondition DcmSequenceOfItems::search | ( | const DcmTagKey & | xtag, | |
DcmStack & | resultStack, | |||
E_SearchMode | mode = ESM_fromHere , |
|||
OFBool | searchIntoSub = OFTrue | |||
) | [virtual] |
a complex, stack-based, hierarchical search method.
It allows for a search for a DICOM object with a given attribute within a given container, hierarchically, from a starting position identified through a cursor stack.
xtag | the DICOM attribute tag we are searching for | |
resultStack | Depending on the search mode (see below), this parameter either serves as an input and output parameter, or as an output parameter only (the latter being the default). When used as an input parameter, the cursor stack defines the start position for the search within a hierarchical DICOM dataset. Upon successful return, the stack contains the position of the element found, in the form of a pointer to each dataset, sequence, item and element from the main dataset down to the found element. | |
mode | search mode, controls how the search stack is handled. In the default mode, ESM_fromHere, the stack is ignored on input, and the search starts in the object for which this method is called. In the other modes, the stack is used both as an input and an output parameter and defines the starting point for the search. | |
searchIntoSub | if true, the search will be performed hierarchically descending into the sequences and items of the dataset. If false, only the current container (sequence or item) will be traversed. |
Reimplemented from DcmObject.
virtual OFCondition DcmSequenceOfItems::loadAllDataIntoMemory | ( | void | ) | [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.
Reimplemented from DcmElement.
virtual OFCondition DcmSequenceOfItems::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.
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. |
Reimplemented from DcmElement.
virtual OFCondition DcmSequenceOfItems::readTagAndLength | ( | DcmInputStream & | inStream, | |
const E_TransferSyntax | xfer, | |||
DcmTag & | tag, | |||
Uint32 & | length | |||
) | [protected, virtual] |
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.
inStream | The stream which contains the information. | |
xfer | The transfer syntax which was used to encode the information in inStream. | |
tag | Contains in the end the tag that was read. | |
length | Contains in the end the length value that was read. |
virtual OFCondition DcmSequenceOfItems::makeSubObject | ( | DcmObject *& | subObject, | |
const DcmTag & | newTag, | |||
const Uint32 | newLength | |||
) | [protected, virtual] |
helper function for read().
Create sub-object (item, item delimiter or sequence delimiter) of the appropriate type depending on the tag.
subObject | upon success, a pointer to the newly created object is returned in this parameter | |
newTag | tag of the sub-object to be created | |
newLength | length of the sub-object to be created |
Reimplemented in DcmPixelSequence.
OFCondition DcmSequenceOfItems::readSubItem | ( | DcmInputStream & | inStream, | |
const DcmTag & | newTag, | |||
const Uint32 | newLength, | |||
const E_TransferSyntax | xfer, | |||
const E_GrpLenEncoding | glenc, | |||
const Uint32 | maxReadLength = DCM_MaxReadLength | |||
) | [protected] |
helper function for read().
Create sub-object (item or pixel item) and call read() for this sub-object.
inStream | The stream which contains the information. | |
newTag | attribute tag for sub-object | |
newLength | length of the sub-object to be created | |
xfer | 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. |
virtual OFCondition DcmSequenceOfItems::searchSubFromHere | ( | const DcmTagKey & | tag, | |
DcmStack & | resultStack, | |||
const OFBool | searchIntoSub | |||
) | [protected, virtual] |
helper function for search().
May only be called if item list is non-empty. Performs hierarchical search for given tag and pushes pointer of sub-element on result stack if found
tag | tag key to be searched | |
resultStack | upon successful return, pointer to element pushed onto this stack | |
searchIntoSub | flag indicating whether recursive search is desired |
static OFCondition DcmSequenceOfItems::writeTagAndVR | ( | DcmOutputStream & | outStream, | |
const DcmTag & | tag, | |||
DcmEVR | vr, | |||
const E_TransferSyntax | oxfer | |||
) | [static, private] |
static helper method used in writeSignatureFormat().
This function resembles DcmObject::writeTagAndLength() but only writes the tag, VR and reserved field.
outStream | stream to write to | |
tag | attribute tag | |
vr | attribute VR as reported by getVR | |
oxfer | output transfer syntax |
OFBool DcmSequenceOfItems::lastItemComplete [private] |
flag used during suspended I/O.
Indicates whether the last item was completely or only partially read/written during the last call to read/write.
Definition at line 564 of file dcsequen.h.
offile_off_t DcmSequenceOfItems::fStartPosition [private] |
used during reading.
Contains the position in the stream where the sequence started (needed for calculating the remaining number of bytes available for a fixed-length sequence).
Definition at line 570 of file dcsequen.h.