OFFIS DCMTK
Version 3.6.0
|
Class for composite reference values. More...
Public Member Functions | |
DSRCompositeReferenceValue () | |
default contructor | |
DSRCompositeReferenceValue (const OFString &sopClassUID, const OFString &sopInstanceUID) | |
constructor. More... | |
DSRCompositeReferenceValue (const DSRCompositeReferenceValue &referenceValue) | |
copy constructor More... | |
virtual | ~DSRCompositeReferenceValue () |
destructor | |
DSRCompositeReferenceValue & | operator= (const DSRCompositeReferenceValue &referenceValue) |
assignment operator More... | |
virtual void | clear () |
clear all internal variables. More... | |
virtual OFBool | isValid () const |
check whether the current reference value is valid. More... | |
virtual OFBool | isEmpty () const |
check whether the current reference value is empty. More... | |
virtual OFCondition | print (STD_NAMESPACE ostream &stream, const size_t flags) const |
print reference value. More... | |
virtual OFCondition | readXML (const DSRXMLDocument &doc, DSRXMLCursor cursor) |
read reference value from XML document More... | |
virtual OFCondition | writeXML (STD_NAMESPACE ostream &stream, const size_t flags) const |
write reference value in XML format More... | |
virtual OFCondition | readSequence (DcmItem &dataset, const OFString &type) |
read referenced SOP sequence from dataset. More... | |
virtual OFCondition | writeSequence (DcmItem &dataset) const |
write referenced SOP sequence to dataset. More... | |
virtual OFCondition | renderHTML (STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &annexStream, size_t &annexNumber, const size_t flags) const |
render composite reference value in HTML/XHTML format More... | |
const OFString & | getSOPClassUID () const |
get SOP class UID More... | |
const OFString & | getSOPInstanceUID () const |
get SOP instance UID More... | |
const DSRCompositeReferenceValue & | getValue () const |
get reference to composite reference value More... | |
OFCondition | getValue (DSRCompositeReferenceValue &referenceValue) const |
get copy of composite reference value More... | |
OFCondition | setValue (const DSRCompositeReferenceValue &referenceValue) |
set composite reference value. More... | |
OFCondition | setReference (const OFString &sopClassUID, const OFString &sopInstanceUID) |
set SOP class UID and SOP instance UID value. More... | |
OFCondition | setSOPClassUID (const OFString &sopClassUID) |
set SOP class UID value. More... | |
OFCondition | setSOPInstanceUID (const OFString &sopInstanceUID) |
set SOP instance UID value. More... | |
Protected Member Functions | |
DSRCompositeReferenceValue * | getValuePtr () |
get pointer to reference value More... | |
virtual OFCondition | readItem (DcmItem &dataset) |
read reference value from dataset More... | |
virtual OFCondition | writeItem (DcmItem &dataset) const |
write reference value to dataset More... | |
virtual OFBool | checkSOPClassUID (const OFString &sopClassUID) const |
check the specified SOP class UID for validity. More... | |
virtual OFBool | checkSOPInstanceUID (const OFString &sopInstanceUID) const |
check the specified SOP instance UID for validity. More... | |
Protected Attributes | |
OFString | SOPClassUID |
reference SOP class UID (VR=UI, type 1) | |
OFString | SOPInstanceUID |
reference SOP instance UID (VR=UI, type 1) | |
Friends | |
class | DSRContentItem |
Class for composite reference values.
Definition at line 47 of file dsrcomvl.h.
DSRCompositeReferenceValue::DSRCompositeReferenceValue | ( | const OFString & | sopClassUID, |
const OFString & | sopInstanceUID | ||
) |
constructor.
The UID pair is only set if it passed the validity check (see setValue()).
sopClassUID | referenced SOP class UID of the composite object. (VR=UI, type 1) |
sopInstanceUID | referenced SOP instance UID of the composite object. (VR=UI, type 1) |
DSRCompositeReferenceValue::DSRCompositeReferenceValue | ( | const DSRCompositeReferenceValue & | referenceValue | ) |
copy constructor
referenceValue | reference value to be copied (not checked !) |
|
protectedvirtual |
check the specified SOP class UID for validity.
The only check that is currently performed is that the UID is not empty. Derived classes might overwrite this method for more specific tests (e.g. allowing only particular SOP classes).
sopClassUID | SOP class UID to be checked |
Reimplemented in DSRImageReferenceValue, and DSRWaveformReferenceValue.
|
protectedvirtual |
check the specified SOP instance UID for validity.
The only check that is currently performed is that the UID is not empty. Derived classes might overwrite this method for more specific tests.
sopInstanceUID | SOP instance UID to be checked |
|
virtual |
clear all internal variables.
Since an empty reference value is invalid the reference becomes invalid afterwards.
Reimplemented in DSRImageReferenceValue, DSRWaveformReferenceValue, DSRCompositeTreeNode, DSRImageTreeNode, and DSRWaveformTreeNode.
|
inline |
get SOP class UID
Definition at line 162 of file dsrcomvl.h.
References SOPClassUID.
|
inline |
get SOP instance UID
Definition at line 170 of file dsrcomvl.h.
References SOPInstanceUID.
|
inline |
get reference to composite reference value
Definition at line 178 of file dsrcomvl.h.
OFCondition DSRCompositeReferenceValue::getValue | ( | DSRCompositeReferenceValue & | referenceValue | ) | const |
get copy of composite reference value
referenceValue | reference to variable in which the value should be stored |
|
inlineprotected |
get pointer to reference value
Definition at line 229 of file dsrcomvl.h.
|
virtual |
check whether the current reference value is empty.
Checks whether both UIDs of the reference value are empty.
|
virtual |
check whether the current reference value is valid.
The reference value is valid if SOP class UID and SOP instance UID are valid (see checkSOP...UID() for details).
Reimplemented in DSRImageReferenceValue, DSRCompositeTreeNode, DSRImageTreeNode, and DSRWaveformTreeNode.
DSRCompositeReferenceValue& DSRCompositeReferenceValue::operator= | ( | const DSRCompositeReferenceValue & | referenceValue | ) |
assignment operator
referenceValue | reference value to be copied (not checked !) |
|
virtual |
print reference value.
The output of a typical composite reference value looks like this: (BasicTextSR,"1.2.3"). If the SOP class UID is unknown the UID is printed instead of the related name.
stream | output stream to which the reference value should be printed |
flags | flag used to customize the output (see DSRTypes::PF_xxx) |
Reimplemented in DSRImageReferenceValue, DSRWaveformReferenceValue, DSRImageTreeNode, DSRWaveformTreeNode, and DSRCompositeTreeNode.
|
protectedvirtual |
read reference value from dataset
dataset | DICOM dataset from which the value should be read |
Reimplemented in DSRImageReferenceValue, and DSRWaveformReferenceValue.
|
virtual |
read referenced SOP sequence from dataset.
The number of items within the sequence is checked. If error/warning output are enabled a warning message is printed if the sequence is absent or contains more than one item.
dataset | DICOM dataset from which the sequence should be read |
type | value type of the sequence (valid value: "1", "2", something else) This parameter is used for checking purpose, any difference is reported. |
|
virtual |
read reference value from XML document
doc | document containing the XML file content |
cursor | cursor pointing to the starting node |
Reimplemented in DSRImageReferenceValue, and DSRWaveformReferenceValue.
|
virtual |
render composite reference value in HTML/XHTML format
docStream | output stream to which the main HTML/XHTML document is written |
annexStream | output stream to which the HTML/XHTML document annex is written |
annexNumber | reference to the variable where the current annex number is stored. Value is increased automatically by 1 after a new entry has been added. |
flags | flag used to customize the output (see DSRTypes::HF_xxx) |
Reimplemented in DSRImageReferenceValue, and DSRWaveformReferenceValue.
OFCondition DSRCompositeReferenceValue::setReference | ( | const OFString & | sopClassUID, |
const OFString & | sopInstanceUID | ||
) |
set SOP class UID and SOP instance UID value.
Before setting the values they are checked (see checkXXX()). If the value pair is invalid the current value pair is not replaced and remains unchanged.
sopClassUID | referenced SOP class UID to be set |
sopInstanceUID | referenced SOP instance UID to be set |
OFCondition DSRCompositeReferenceValue::setSOPClassUID | ( | const OFString & | sopClassUID | ) |
set SOP class UID value.
Before setting the value is is checked (see checkSOPClassUID()). If the value is invalid the current value is not replaced and remains unchanged.
sopClassUID | SOP class UID to be set |
OFCondition DSRCompositeReferenceValue::setSOPInstanceUID | ( | const OFString & | sopInstanceUID | ) |
set SOP instance UID value.
Before setting the value is is checked (see checkSOPInstanceUID()). If the value is invalid the current value is not replaced and remains unchanged.
sopInstanceUID | SOP instance UID to be set |
OFCondition DSRCompositeReferenceValue::setValue | ( | const DSRCompositeReferenceValue & | referenceValue | ) |
set composite reference value.
Before setting the reference it is checked (see checkXXX()). If the value is invalid the current value is not replaced and remains unchanged.
referenceValue | value to be set |
|
protectedvirtual |
write reference value to dataset
dataset | DICOM dataset to which the value should be written |
Reimplemented in DSRImageReferenceValue, and DSRWaveformReferenceValue.
|
virtual |
write referenced SOP sequence to dataset.
If the value is empty an empty sequence (without any items) is written.
dataset | DICOM dataset to which the sequence should be written |
|
virtual |
write reference value in XML format
stream | output stream to which the XML document is written |
flags | flag used to customize the output (see DSRTypes::XF_xxx) |
Reimplemented in DSRImageReferenceValue, DSRWaveformReferenceValue, DSRImageTreeNode, DSRWaveformTreeNode, and DSRCompositeTreeNode.