OFFIS DCMTK
Version 3.6.0
|
a class handling the DICOM dataset format (files without meta header) More...
Public Member Functions | |
DcmDataset () | |
default constructor | |
DcmDataset (const DcmDataset &old) | |
copy constructor More... | |
virtual | ~DcmDataset () |
destructor | |
DcmDataset & | operator= (const DcmDataset &obj) |
assignment operator More... | |
virtual DcmObject * | clone () const |
clone method More... | |
virtual OFCondition | copyFrom (const DcmObject &rhs) |
Virtual object copying. More... | |
virtual DcmEVR | ident () const |
get type identifier More... | |
virtual OFCondition | clear () |
clear (remove) attribute value More... | |
virtual void | removeInvalidGroups () |
remove all elements with an invalid group number, i.e. More... | |
E_TransferSyntax | getOriginalXfer () const |
return the transfer syntax in which this dataset was originally read. More... | |
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 all elements of the dataset to a stream More... | |
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. More... | |
virtual OFBool | canWriteXfer (const E_TransferSyntax newXfer, const E_TransferSyntax oldXfer=EXS_Unknown) |
check if this DICOM object can be encoded in the given transfer syntax. More... | |
virtual OFCondition | read (DcmInputStream &inStream, const E_TransferSyntax xfer=EXS_Unknown, 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 this->elementList. More... | |
virtual OFCondition | write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache) |
write dataset to a stream More... | |
virtual OFCondition | write (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache, const E_GrpLenEncoding glenc, const E_PaddingEncoding padenc=EPD_noChange, const Uint32 padlen=0, const Uint32 subPadlen=0, Uint32 instanceLength=0) |
This function writes data values which are contained in this DcmDataset object to the stream which is passed as first argument. More... | |
virtual OFCondition | writeSignatureFormat (DcmOutputStream &outStream, const E_TransferSyntax oxfer, const E_EncodingType enctype, DcmWriteCache *wcache) |
special write method for creation of digital signatures More... | |
virtual OFCondition | writeXML (STD_NAMESPACE ostream &out, const size_t flags=0) |
write object in XML format. More... | |
virtual OFCondition | loadFile (const char *fileName, const E_TransferSyntax readXfer=EXS_Unknown, const E_GrpLenEncoding groupLength=EGL_noChange, const Uint32 maxReadLength=DCM_MaxReadLength) |
load object from a DICOM file. More... | |
virtual OFCondition | saveFile (const char *fileName, const E_TransferSyntax writeXfer=EXS_Unknown, const E_EncodingType encodingType=EET_UndefinedLength, const E_GrpLenEncoding groupLength=EGL_recalcGL, const E_PaddingEncoding padEncoding=EPD_noChange, const Uint32 padLength=0, const Uint32 subPadLength=0) |
save object to a DICOM file. More... | |
OFCondition | chooseRepresentation (const E_TransferSyntax repType, const DcmRepresentationParameter *repParam) |
select a specific representation (compressed or uncompressed) of the dataset and create the representation if needed. More... | |
OFBool | hasRepresentation (const E_TransferSyntax repType, const DcmRepresentationParameter *repParam) |
check if all PixelData elements in this dataset have a representation conforming to the given transfer syntax and representation parameters (see dcpixel.h for definition of "conforming"). More... | |
void | removeAllButOriginalRepresentations () |
removes all but the original representation in all pixel data elements | |
void | removeAllButCurrentRepresentations () |
removes all but the current representation and sets the original representation to current | |
![]() | |
DcmItem () | |
default constructor | |
DcmItem (const DcmTag &tag, const Uint32 len=0) | |
constructor. More... | |
DcmItem (const DcmItem &old) | |
copy constructor More... | |
DcmItem & | operator= (const DcmItem &obj) |
assignment operator. More... | |
virtual | ~DcmItem () |
destructor | |
virtual unsigned long | getVM () |
get value multiplicity More... | |
virtual unsigned long | card () const |
get cardinality of this item More... | |
virtual OFBool | isLeaf () const |
check if this element is a leaf node in a dataset tree. More... | |
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. More... | |
virtual void | transferInit () |
initialize the transfer state of this object. More... | |
virtual void | transferEnd () |
finalize the transfer state of this object. More... | |
virtual OFBool | containsUnknownVR () const |
returns true if the object contains an element with Unknown VR at any nesting level More... | |
virtual OFBool | containsExtendedCharacters (const OFBool checkAllStrings=OFFalse) |
check if this object contains non-ASCII characters at any nesting level More... | |
virtual OFBool | isAffectedBySpecificCharacterSet () const |
check if this object is affected by SpecificCharacterSet at any nesting level. More... | |
virtual OFCondition | insert (DcmElement *elem, OFBool replaceOld=OFFalse, OFBool checkInsertOrder=OFFalse) |
insert a new element into the list of elements maintained by this item. More... | |
virtual DcmElement * | getElement (const unsigned long num) |
access an element from the item. More... | |
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). More... | |
virtual DcmObject * | nextInContainer (const DcmObject *obj) |
this method is only used in container classes, that is, DcmItem and DcmSequenceOfItems. More... | |
virtual DcmElement * | remove (const unsigned long num) |
remove element from list. More... | |
virtual DcmElement * | remove (DcmObject *elem) |
remove element from list. More... | |
virtual DcmElement * | remove (const DcmTagKey &tag) |
remove element from list. More... | |
virtual OFBool | isEmpty (const OFBool normalize=OFTrue) |
check if this item is empty More... | |
virtual OFCondition | verify (const OFBool autocorrect=OFFalse) |
check the currently stored element value More... | |
virtual OFCondition | search (const DcmTagKey &xtag, DcmStack &resultStack, E_SearchMode mode=ESM_fromHere, OFBool searchIntoSub=OFTrue) |
a complex, stack-based, hierarchical search method. More... | |
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. More... | |
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. More... | |
OFBool | tagExists (const DcmTagKey &key, OFBool searchIntoSub=OFFalse) |
check if an element with the given attribute tag exists in the dataset More... | |
OFBool | tagExistsWithValue (const DcmTagKey &key, OFBool searchIntoSub=OFFalse) |
check if an element with the given attribute tag exists in the dataset and has a non-empty value (i.e., length > 0) More... | |
OFCondition | findAndGetElement (const DcmTagKey &tagKey, DcmElement *&element, const OFBool searchIntoSub=OFFalse, const OFBool createCopy=OFFalse) |
find element and get a pointer to it (or copy it). More... | |
OFCondition | findAndGetElements (const DcmTagKey &tagKey, DcmStack &resultStack) |
find all elements matching a particular tag and return references to them on a stack. More... | |
OFCondition | findAndGetString (const DcmTagKey &tagKey, const char *&value, const OFBool searchIntoSub=OFFalse) |
find element and get value as a reference to a C string. More... | |
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). More... | |
OFCondition | findAndGetOFStringArray (const DcmTagKey &tagKey, OFString &value, const OFBool searchIntoSub=OFFalse) |
find element and get value as a C++ string (all components). More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
OFCondition | findAndGetSequence (const DcmTagKey &seqTagKey, DcmSequenceOfItems *&sequence, const OFBool searchIntoSub=OFFalse, const OFBool createCopy=OFFalse) |
looks up and returns a given sequence. More... | |
OFCondition | findAndGetSequenceItem (const DcmTagKey &seqTagKey, DcmItem *&item, const signed long itemNum=0, const OFBool createCopy=OFFalse) |
looks up and returns a given sequence item, if it exists. More... | |
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. More... | |
OFCondition | findAndInsertCopyOfElement (const DcmTagKey &tagKey, DcmItem *destItem, const OFBool replaceOld=OFTrue) |
find element, create a copy and insert it into the given destination dataset. More... | |
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. More... | |
OFCondition | findAndDeleteSequenceItem (const DcmTagKey &seqTagKey, const signed long itemNum) |
looks up the given sequence in the current dataset and deletes the given item. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
OFCondition | insertEmptyElement (const DcmTag &tag, const OFBool replaceOld=OFTrue) |
create a new element (with no value) and insert it into the dataset/item. More... | |
OFCondition | insertSequenceItem (const DcmTag &seqTag, DcmItem *item, const signed long itemNum=-2) |
looks up the given sequence in the current dataset and inserts the given item. More... | |
![]() | |
DcmObject (const DcmTag &tag, const Uint32 len=0) | |
constructor. More... | |
DcmObject (const DcmObject &obj) | |
copy constructor More... | |
virtual | ~DcmObject () |
destructor | |
DcmObject & | operator= (const DcmObject &obj) |
copy assignment operator More... | |
DcmEVR | getVR () const |
return the value representation assigned to this object. More... | |
OFBool | isaString () const |
check if this element is a string type, based on the VR. More... | |
E_TransferState | transferState () const |
return the current transfer (read/write) state of this object. More... | |
Uint16 | getGTag () const |
return the group number of the attribute tag for this object More... | |
Uint16 | getETag () const |
return the element number of the attribute tag for this object More... | |
const DcmTag & | getTag () const |
return const reference to the attribute tag for this object More... | |
void | setGTag (Uint16 gtag) |
assign group tag (but not element tag) of the attribute tag for this object. More... | |
virtual OFCondition | setVR (DcmEVR) |
assign a new Value Representation (VR) to this object. More... | |
virtual OFBool | isSignable () const |
returns true if the current object may be included in a digital signature More... | |
Uint32 | getLengthField () const |
return the current value of the Length field (which is different from the functionality of the public getLength method). More... | |
Private Attributes | |
E_TransferSyntax | Xfer |
current transfer syntax of the dataset | |
Additional Inherited Members | |
![]() | |
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. More... | |
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. More... | |
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. More... | |
void | checkAndUpdateVR (DcmItem &item, DcmTag &tag) |
check whether the given tag requires some special handling regarding the VR (i.e. More... | |
![]() | |
void | printNestingLevel (STD_NAMESPACE ostream &out, const size_t flags, const int level) |
print line indentation, e.g. More... | |
void | printInfoLineStart (STD_NAMESPACE ostream &out, const size_t flags, const int level, DcmTag *tag=NULL) |
print beginning of the info line. More... | |
void | printInfoLineEnd (STD_NAMESPACE ostream &out, const size_t flags, const unsigned long printedLength=0xffffffff, DcmTag *tag=NULL) |
print end of the info line. More... | |
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. More... | |
virtual OFCondition | writeTagAndLength (DcmOutputStream &outStream, const E_TransferSyntax oxfer, Uint32 &writtenBytes) const |
write tag, VR and length field to the given output stream More... | |
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. More... | |
const char * | getTagName () |
return the DICOM attribute tag name for this object. More... | |
void | setTagVR (DcmEVR vr) |
set the VR for this attribute More... | |
E_TransferState | getTransferState () const |
return the current transfer state of this object during serialization/deserialization More... | |
void | setTransferState (E_TransferState newState) |
set the current transfer state of this object during serialization/deserialization More... | |
Uint32 | getTransferredBytes () const |
return the number of transferred bytes for this object during serialization/deserialization More... | |
void | setTransferredBytes (Uint32 val) |
set the number of transferred bytes for this object during serialization/deserialization More... | |
void | incTransferredBytes (Uint32 val) |
add to the number of transferred bytes for this object during serialization/deserialization More... | |
void | setLengthField (Uint32 val) |
set the current value of the Length field More... | |
![]() | |
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. More... | |
![]() | |
DcmList * | elementList |
the list of elements maintained by this object | |
OFBool | lastElementComplete |
flag used during suspended I/O. More... | |
offile_off_t | fStartPosition |
used during reading. More... | |
![]() | |
OFCondition | errorFlag |
error flag for this object. | |
a class handling the DICOM dataset format (files without meta header)
Definition at line 46 of file dcdatset.h.
DcmDataset::DcmDataset | ( | const DcmDataset & | old | ) |
copy constructor
old | dataset to be copied |
|
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. Never returns undefined length.
xfer | transfer syntax for length calculation |
enctype | sequence encoding type for length calculation |
Reimplemented from DcmItem.
Referenced by clone().
|
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 DcmItem.
Referenced by clone().
OFCondition DcmDataset::chooseRepresentation | ( | const E_TransferSyntax | repType, |
const DcmRepresentationParameter * | repParam | ||
) |
select a specific representation (compressed or uncompressed) of the dataset and create the representation if needed.
This may cause compression or decompression to be applied to the pixel data in the dataset.
repType | desired transfer syntax |
repParam | desired representation parameter (e.g. quality factor for lossy compression) |
Referenced by DcmFileFormat::chooseRepresentation(), and clone().
|
virtual |
|
inlinevirtual |
clone method
Reimplemented from DcmItem.
Definition at line 73 of file dcdatset.h.
References calcElementLength(), canWriteXfer(), chooseRepresentation(), clear(), copyFrom(), DcmDataset(), getOriginalXfer(), hasRepresentation(), ident(), loadFile(), print(), read(), removeAllButCurrentRepresentations(), removeAllButOriginalRepresentations(), removeInvalidGroups(), saveFile(), write(), writeSignatureFormat(), and writeXML().
|
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 DcmItem.
Referenced by clone().
E_TransferSyntax DcmDataset::getOriginalXfer | ( | ) | const |
return the transfer syntax in which this dataset was originally read.
Referenced by clone().
OFBool DcmDataset::hasRepresentation | ( | const E_TransferSyntax | repType, |
const DcmRepresentationParameter * | repParam | ||
) |
check if all PixelData elements in this dataset have a representation conforming to the given transfer syntax and representation parameters (see dcpixel.h for definition of "conforming").
repType | desired transfer syntax |
repParam | desired representation parameter (e.g. quality factor for lossy compression) |
Referenced by clone(), and DcmFileFormat::hasRepresentation().
|
virtual |
|
virtual |
load object from a DICOM file.
This method only supports DICOM objects stored as a dataset, i.e. without meta header. Use DcmFileFormat::loadFile() to load files with meta header.
fileName | name of the file to load |
readXfer | transfer syntax used to read the data (auto detection if EXS_Unknown) |
groupLength | flag, specifying how to handle the group length tags |
maxReadLength | maximum number of bytes to be read for an element value. Element values with a larger size are not loaded until their value is retrieved (with getXXX()) or loadAllDataElements() is called. |
Referenced by clone().
DcmDataset& DcmDataset::operator= | ( | const DcmDataset & | obj | ) |
assignment operator
obj | the dataset to be copied |
|
virtual |
print all elements of the dataset 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 | optional filename used to write the raw pixel data file |
pixelCounter | optional counter used for automatic pixel data filename creation |
Reimplemented from DcmItem.
Referenced by clone().
|
virtual |
This function reads the information of all attributes which are captured in the input stream and captures this information in this->elementList.
Each attribute is represented as an element in this list. Having read all information for this particular data set or command, this function will also take care of group length (according to what is specified in glenc) and padding elements (don't change anything).
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 DcmItem.
Referenced by clone().
|
virtual |
remove all elements with an invalid group number, i.e.
0x0000 to 0x0003, 0x0005, 0x0007 and 0xFFFF
Referenced by clone().
|
virtual |
save object to a DICOM file.
This method only supports DICOM objects stored as a dataset, i.e. without meta header. Use DcmFileFormat::saveFile() to save files with meta header.
fileName | name of the file to save |
writeXfer | transfer syntax used to write the data (EXS_Unknown means use current) |
encodingType | flag, specifying the encoding with undefined or explicit length |
groupLength | flag, specifying how to handle the group length tags |
padEncoding | flag, specifying how to handle the padding tags |
padLength | number of bytes used for the dataset padding (has to be an even number) |
subPadLength | number of bytes used for the item padding (has to be an even number) |
Referenced by clone().
|
virtual |
write dataset 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 DcmItem.
Referenced by clone().
|
virtual |
This function writes data values which are contained in this DcmDataset object to the stream which is passed as first argument.
With regard to the writing of information, the other parameters which are passed are accounted for. The function will return EC_Normal, if the information from all elements of this data set has been written to the buffer, it will return EC_StreamNotifyClient, if there is no more space in the buffer and not all elements have been written to it, and it will return some other (error) value if there was an error.
outStream | The stream that the information will be written to. |
oxfer | The transfer syntax which shall be used. |
enctype | Encoding type for sequences; specifies how sequences will be handled. |
wcache | pointer to write cache object, may be NULL |
glenc | Encoding type for group length; specifies what will be done with group length tags. |
padenc | Encoding type for padding. Specifies what will be done with padding tags. |
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 |
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 DcmItem.
Referenced by clone().
|
virtual |
write object in XML format.
The XML declaration (e.g. <?xml version="1.0"?>) is not written by this function.
out | output stream to which the XML document is written |
flags | optional flag used to customize the output (see DCMTypes::XF_xxx) |
Reimplemented from DcmItem.
Referenced by clone().