33 #include "dcmtk/config/osconfig.h" 35 #include "dcmtk/ofstd/offile.h" 36 #include "dcmtk/dcmdata/dcelem.h" 37 #include "dcmtk/dcmdata/dctag.h" 38 #include "dcmtk/dcmdata/dclist.h" 39 #include "dcmtk/dcmdata/dcstack.h" 59 OFBool readAsUN = OFFalse);
105 virtual DcmEVR
ident()
const {
return EVR_SQ; }
113 virtual OFBool
isLeaf()
const {
return OFFalse; }
122 virtual void print(STD_NAMESPACE ostream&out,
123 const size_t flags = 0,
125 const char *pixelFileName = NULL,
126 size_t *pixelCounter = NULL);
137 const OFBool oldFormat = OFFalse);
142 virtual unsigned long getVM() {
return 1L; }
173 (
const E_GrpLenEncoding glenc,
174 const E_PaddingEncoding padenc = EPD_noChange,
175 const E_TransferSyntax xfer = EXS_Unknown,
176 const E_EncodingType enctype = EET_ExplicitLength,
177 const Uint32 padlen = 0,
178 const Uint32 subPadlen = 0,
179 Uint32 instanceLength = 0);
198 const E_EncodingType enctype);
212 virtual Uint32
getLength(
const E_TransferSyntax xfer = EXS_LittleEndianImplicit,
213 const E_EncodingType enctype = EET_UndefinedLength);
230 virtual OFBool
canWriteXfer(
const E_TransferSyntax oldXfer,
231 const E_TransferSyntax newXfer);
247 const E_TransferSyntax xfer,
248 const E_GrpLenEncoding glenc = EGL_noChange,
249 const Uint32 maxReadLength = DCM_MaxReadLength);
259 const E_TransferSyntax oxfer,
260 const E_EncodingType enctype,
269 const size_t flags = 0);
279 const E_TransferSyntax oxfer,
280 const E_EncodingType enctype,
311 virtual unsigned long card();
329 unsigned long where = DCM_EndOfListIndex,
330 OFBool before = OFFalse);
347 OFBool before = OFFalse);
391 virtual DcmItem *
remove(
const unsigned long num);
405 virtual OFBool
isEmpty(
const OFBool normalize = OFTrue);
441 E_SearchMode mode = ESM_fromHere,
442 OFBool searchIntoSub = OFTrue);
474 E_ByteOrder byteOrder = gLocalByteOrder);
495 const E_TransferSyntax xfer,
508 const Uint32 newLength);
524 const Uint32 newLength,
525 const E_TransferSyntax xfer,
526 const E_GrpLenEncoding glenc,
527 const Uint32 maxReadLength = DCM_MaxReadLength);
539 const OFBool searchIntoSub);
558 const E_TransferSyntax oxfer);
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 OFBool canWriteXfer(const E_TransferSyntax oldXfer, const E_TransferSyntax newXfer)
check if this DICOM object can be encoded in the given transfer syntax.
a class representing a list of DICOM elements in which each element has a different tag and elements ...
static OFCondition writeTagAndVR(DcmOutputStream &outStream, const DcmTag &tag, DcmEVR vr, const E_TransferSyntax oxfer)
static helper method used in writeSignatureFormat().
class maintaining a attribute tag (group and element number)
DcmList * itemList
the list of items maintained by this sequence object
virtual OFCondition write(DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache)
write object to a stream
virtual unsigned long getVM()
get value multiplicity
OFCondition error() const
returns current status flag
virtual unsigned long card()
get cardinality of this sequence
offile_off_t fStartPosition
used during reading.
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 capt...
virtual OFCondition insertAtCurrentPos(DcmItem *item, OFBool before=OFFalse)
insert new item a current position.
virtual OFBool isLeaf() const
check if this element is a leaf node in a dataset tree.
abstract base class for all DICOM elements
class representing a DICOM Sequence of Items (SQ).
virtual OFCondition writeXML(STD_NAMESPACE ostream &out, const size_t flags=0)
write object in XML format
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 void transferEnd()
finalize the transfer state of this object.
This class implements a simple container that stores an input stream, the position of that input stre...
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 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 call...
OFCondition errorFlag
error flag for this object.
this class encapsulates an attribute tag (group, element) and a VR.
virtual OFCondition makeSubObject(DcmObject *&subObject, const DcmTag &newTag, const Uint32 newLength)
helper function for read().
This class implements a buffering mechanism that is used when writing large elements that reside in f...
base class for output streams.
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...
Abstract base class for most classes in module dcmdata.
virtual DcmEVR ident() const
return identifier for this class.
OFBool readAsUN_
true if this sequence has been instantiated while reading an UN element with undefined length ...
virtual OFCondition verify(const OFBool autocorrect=OFFalse)
check the currently stored element value
virtual OFBool isSignable() const
returns true if the current object may be included in a digital signature
virtual OFCondition search(const DcmTagKey &xtag, DcmStack &resultStack, E_SearchMode mode=ESM_fromHere, OFBool searchIntoSub=OFTrue)
a complex, stack-based, hierarchical search method.
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 ...
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 DcmItem * getItem(const unsigned long num)
access an item from the sequence.
virtual void transferInit()
initialize the transfer state of this object.
this class manages a stack of pointers to DcmObject instances.
virtual OFBool isAffectedBySpecificCharacterSet() const
check if this object is affected by SpecificCharacterSet at any nesting level.
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 en...
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 t...
virtual DcmObject * clone() const
clone method
DcmSequenceOfItems & operator=(const DcmSequenceOfItems &obj)
copy assignment operator
virtual OFBool isEmpty(const OFBool normalize=OFTrue)
check if this sequence is empty
virtual ~DcmSequenceOfItems()
destructor
virtual OFCondition writeSignatureFormat(DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache)
special write method for creation of digital signatures
virtual DcmObject * nextInContainer(const DcmObject *obj)
this method is only used in container classes, that is, DcmItem and DcmSequenceOfItems.
a simple string class that implements a subset of std::string.
virtual OFCondition append(DcmItem *item)
insert the given item at the end of the item list maintained by this sequence.
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 OFCondition loadAllDataIntoMemory(void)
this method loads all attribute values maintained by this object and all sub-objects (in case of a co...
virtual OFCondition nextObject(DcmStack &stack, const OFBool intoSub)
this method enables a stack based, depth-first traversal of a complete hierarchical DICOM dataset (th...
virtual OFCondition clear()
clear (remove) attribute value
virtual OFCondition prepend(DcmItem *item)
insert the given item at the start of the item list maintained by this sequence.
virtual OFCondition copyFrom(const DcmObject &rhs)
Virtual object copying.
OFBool lastItemComplete
flag used during suspended I/O.
virtual OFCondition searchSubFromHere(const DcmTagKey &tag, DcmStack &resultStack, const OFBool searchIntoSub)
helper function for search().
DcmSequenceOfItems(const DcmTag &tag, const Uint32 len=0, OFBool readAsUN=OFFalse)
constructor
double-linked list class that maintains pointers to DcmObject instances.
General purpose class for condition codes.