DCMTK
Version 3.6.1 20120515
OFFIS DICOM Toolkit
|
Base class for content items. More...
Public Member Functions | |
DSRDocumentTreeNode (const E_RelationshipType relationshipType, const E_ValueType valueType) | |
constructor. | |
virtual | ~DSRDocumentTreeNode () |
destructor | |
virtual void | clear () |
clear all member variables. | |
virtual OFBool | isValid () const |
check whether the content item is valid. | |
virtual OFBool | isShort (const size_t flags) const |
check whether the content is short. | |
virtual OFCondition | print (STD_NAMESPACE ostream &stream, const size_t flags) const |
print content item. | |
virtual OFCondition | read (DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const size_t flags) |
read content item from dataset. | |
virtual OFCondition | write (DcmItem &dataset, DcmStack *markedItems=NULL) |
write content item to dataset. | |
virtual OFCondition | readXML (const DSRXMLDocument &doc, DSRXMLCursor cursor, const E_DocumentType documentType, const size_t flags) |
read general XML document tree node data | |
virtual OFCondition | writeXML (STD_NAMESPACE ostream &stream, const size_t flags) const |
write content item in XML format | |
virtual OFCondition | renderHTML (STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags) const |
render content item in HTML/XHTML format. | |
OFBool | isSigned () |
check whether content item is digitally signed. | |
OFBool | isMarked () const |
check whether content item is marked. | |
void | setMark (const OFBool flag) |
mark/unmark the current content item. | |
OFBool | isReferenceTarget () const |
check whether the current content item is target of a by-reference relationship | |
void | setReferenceTarget (const OFBool isTarget=OFTrue) |
specify whether the current content item is target of a by-reference relationship | |
OFBool | hasChildNodes () const |
check whether the current content item has any children | |
OFBool | hasSiblingNodes () const |
check whether the current content item has any siblings | |
size_t | getNodeID () const |
get ID of the current tree node | |
E_RelationshipType | getRelationshipType () const |
get relationship type of the current content item | |
E_ValueType | getValueType () const |
get value type of the current content item | |
const DSRCodedEntryValue & | getConceptName () const |
get reference to the concept name | |
OFCondition | getConceptName (DSRCodedEntryValue &conceptName) const |
get copy of the concept name. | |
virtual OFCondition | setConceptName (const DSRCodedEntryValue &conceptName) |
set the concept name. | |
const OFString & | getObservationDateTime () const |
get observation date time. | |
virtual OFCondition | setObservationDateTime (const OFString &observationDateTime) |
set observation date time. | |
const OFString & | getObservationUID () const |
get observation unique identifier. | |
virtual OFCondition | setObservationUID (const OFString &observationUID) |
set observation unique identifier. | |
OFCondition | getTemplateIdentification (OFString &templateIdentifier, OFString &mappingResource) const |
get template identifier and mapping resource. | |
virtual OFCondition | setTemplateIdentification (const OFString &templateIdentifier, const OFString &mappingResource) |
set template identifier and mapping resource. | |
void | removeSignatures () |
remove digital signatures from content item. | |
Protected Member Functions | |
DSRCodedEntryValue * | getConceptNamePtr () |
get pointer to the concept name | |
OFCondition | createAndAppendNewNode (DSRDocumentTreeNode *&previousNode, const E_RelationshipType relationshipType, const E_ValueType valueType, const DSRIODConstraintChecker *constraintChecker=NULL) |
create a new node and append it to the current one | |
virtual OFCondition | readContentItem (DcmItem &dataset) |
read content item (value) from dataset. | |
virtual OFCondition | writeContentItem (DcmItem &dataset) const |
write content item (value) to dataset. | |
virtual OFCondition | readXMLContentItem (const DSRXMLDocument &doc, DSRXMLCursor cursor) |
read content item specific XML data. | |
virtual OFCondition | renderHTMLContentItem (STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags) const |
render content item (value) in HTML/XHTML format. | |
void | writeXMLItemStart (STD_NAMESPACE ostream &stream, const size_t flags, const OFBool closingBracket=OFTrue) const |
write common item start (XML tag) | |
void | writeXMLItemEnd (STD_NAMESPACE ostream &stream, const size_t flags) const |
write common item start (XML tag) | |
OFCondition | readSRDocumentContentModule (DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const size_t flags) |
read SR document content module | |
OFCondition | writeSRDocumentContentModule (DcmItem &dataset, DcmStack *markedItems) |
write SR document content module | |
OFCondition | readDocumentRelationshipMacro (DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const OFString &posString, const size_t flags) |
read document relationship macro | |
OFCondition | writeDocumentRelationshipMacro (DcmItem &dataset, DcmStack *markedItems) |
write document relationship macro | |
OFCondition | readDocumentContentMacro (DcmItem &dataset, const OFString &posString, const size_t flags) |
read document content macro | |
OFCondition | writeDocumentContentMacro (DcmItem &dataset) const |
write document content macro | |
OFCondition | readContentSequence (DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const OFString &posString, const size_t flags) |
read content sequence | |
OFCondition | writeContentSequence (DcmItem &dataset, DcmStack *markedItems) const |
write content sequence | |
OFCondition | renderHTMLConceptName (STD_NAMESPACE ostream &docStream, const size_t flags) const |
render concept name in HTML/XHTML format. | |
OFCondition | renderHTMLChildNodes (STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags) const |
render child nodes in HTML/XHTML format | |
Static Protected Member Functions | |
static const OFString & | getRelationshipText (const E_RelationshipType relationshipType, OFString &relationshipText, const size_t flags) |
convert relationship type into a text used for HTML rendering | |
Private Member Functions | |
DSRDocumentTreeNode (const DSRDocumentTreeNode &) | |
DSRDocumentTreeNode & | operator= (const DSRDocumentTreeNode &) |
Private Attributes | |
OFBool | MarkFlag |
flag indicating whether the content item is marked (e.g. used for digital signatures) | |
OFBool | ReferenceTarget |
flag indicating whether the content item is referenced (by-reference relationship) | |
const E_RelationshipType | RelationshipType |
relationship type to the parent node (associated DICOM VR=CS, mandatory) | |
const E_ValueType | ValueType |
value type (associated DICOM VR=CS, mandatory) | |
DSRCodedEntryValue | ConceptName |
concept name (VR=SQ, conditional) | |
OFString | ObservationDateTime |
observation date and time (VR=DT, conditional) | |
OFString | ObservationUID |
observation unique identifier (VR=UI, optional) | |
OFString | TemplateIdentifier |
template identifier (VR=CS, mandatory in ContentTemplateSequence) | |
OFString | MappingResource |
mapping resource (VR=CS, mandatory in ContentTemplateSequence) | |
DcmSequenceOfItems | MACParameters |
MAC parameters sequence (VR=SQ, optional) | |
DcmSequenceOfItems | DigitalSignatures |
digital signatures sequence (VR=SQ, optional) | |
Friends | |
class | DSRContentItem |
Base class for content items.
DSRDocumentTreeNode::DSRDocumentTreeNode | ( | const E_RelationshipType | relationshipType, |
const E_ValueType | valueType | ||
) |
constructor.
The 'relationshipType' and 'valueType' can never be changed after the tree node has been created (therefore, the corresponding member variables are declared "const").
relationshipType | type of relationship to the parent tree node. Should not be RT_invalid and RT_isRoot only for the root node. |
valueType | value type of the associated content item. Should not be VT_invalid. |
virtual void DSRDocumentTreeNode::clear | ( | ) | [virtual] |
clear all member variables.
This does not apply to the relationship and value type since they are never changed.
Reimplemented in DSRByReferenceTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRPNameTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, DSRContainerTreeNode, DSRCodeTreeNode, DSRCompositeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, and DSRWaveformTreeNode.
OFCondition DSRDocumentTreeNode::createAndAppendNewNode | ( | DSRDocumentTreeNode *& | previousNode, |
const E_RelationshipType | relationshipType, | ||
const E_ValueType | valueType, | ||
const DSRIODConstraintChecker * | constraintChecker = NULL |
||
) | [protected] |
create a new node and append it to the current one
previousNode | reference to the pointer to the previous node (sibling). Used to decide whether the new node is a child (value=NULL) or a sibling (!=NULL). NB: The value might be modified inside this method (to store a reference to the previous node). |
relationshipType | relationship type of the new node with regard to the current one |
valueType | value type of node to be added |
constraintChecker | checks relationship content constraints of the associated IOD |
const DSRCodedEntryValue& DSRDocumentTreeNode::getConceptName | ( | ) | const [inline] |
get reference to the concept name
OFCondition DSRDocumentTreeNode::getConceptName | ( | DSRCodedEntryValue & | conceptName | ) | const |
get copy of the concept name.
Code describing the concept represented by this content item. Also conveys the value of document title and section headings in documents.
conceptName | reference to a variable where the code should be stored |
DSRCodedEntryValue* DSRDocumentTreeNode::getConceptNamePtr | ( | ) | [inline, protected] |
get pointer to the concept name
size_t DSRDocumentTreeNode::getNodeID | ( | ) | const [inline] |
get ID of the current tree node
const OFString& DSRDocumentTreeNode::getObservationDateTime | ( | ) | const [inline] |
get observation date time.
This is the date and time on which this content item was completed. Might be empty if the date and time do not differ from the content date and time, see DSRDocument.
const OFString& DSRDocumentTreeNode::getObservationUID | ( | ) | const [inline] |
get observation unique identifier.
The UID represents the semantic content of the observation; an encoding of the same observation with the same context into another representation may use the same UID.
static const OFString& DSRDocumentTreeNode::getRelationshipText | ( | const E_RelationshipType | relationshipType, |
OFString & | relationshipText, | ||
const size_t | flags | ||
) | [static, protected] |
convert relationship type into a text used for HTML rendering
relationshipType | type of relationship to be converted |
relationshipText | reference to string variable where the resulting text should be stored. Value is cleared if 'relationshipType' is invalid or not supported. |
flags | flag used to customize the output (see DSRTypes::HF_xxx) |
E_RelationshipType DSRDocumentTreeNode::getRelationshipType | ( | ) | const [inline] |
get relationship type of the current content item
OFCondition DSRDocumentTreeNode::getTemplateIdentification | ( | OFString & | templateIdentifier, |
OFString & | mappingResource | ||
) | const |
get template identifier and mapping resource.
This value pair identifies the template that was used to create this content item (and its children). According to the DICOM standard it is "required if a template was used to define the content of this Item, and the template consists of a single CONTAINER with nested content, and it is the outermost invocation of a set of nested templates that start with the same CONTAINER." However, this condition is currently not checked. The identification is valid if both values are either present (non-empty) or absent (empty).
templateIdentifier | identifier of the template (might be empty) |
mappingResource | mapping resource that defines the template (might be empty) |
E_ValueType DSRDocumentTreeNode::getValueType | ( | ) | const [inline] |
get value type of the current content item
OFBool DSRDocumentTreeNode::hasChildNodes | ( | ) | const [inline] |
check whether the current content item has any children
OFBool DSRDocumentTreeNode::hasSiblingNodes | ( | ) | const [inline] |
check whether the current content item has any siblings
OFBool DSRDocumentTreeNode::isMarked | ( | ) | const [inline] |
check whether content item is marked.
Use method 'setMark' to mark and unmark the current content item. Pointers to the DICOM dataset/item of marked content items are added to the optional stack when calling the 'write' method. This mechanism can e.g. be used to digitally sign particular content items.
OFBool DSRDocumentTreeNode::isReferenceTarget | ( | ) | const [inline] |
check whether the current content item is target of a by-reference relationship
virtual OFBool DSRDocumentTreeNode::isShort | ( | const size_t | flags | ) | const [virtual] |
check whether the content is short.
This method is used to check whether the rendered output of this content item can be expanded inline or not (used for renderHTML()). This base class always returns OFTrue.
flags | flag used to customize the output (see DSRTypes::HF_xxx) |
Reimplemented in DSRTextTreeNode, DSRContainerTreeNode, DSRImageTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, and DSRWaveformTreeNode.
OFBool DSRDocumentTreeNode::isSigned | ( | ) | [inline] |
check whether content item is digitally signed.
A content item is signed if the DigitalSignaturesSequence exists. This sequence is read from the dataset if present and the 'signature' flag for the 'read' method is turned on.
virtual OFBool DSRDocumentTreeNode::isValid | ( | ) | const [virtual] |
check whether the content item is valid.
The content item is valid if the relationship type and the value type are both not invalid.
Reimplemented in DSRByReferenceTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRPNameTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, DSRContainerTreeNode, DSRCodeTreeNode, DSRCompositeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, and DSRWaveformTreeNode.
virtual OFCondition DSRDocumentTreeNode::print | ( | STD_NAMESPACE ostream & | stream, |
const size_t | flags | ||
) | const [virtual] |
print content item.
The output of a content item depends on its value type. This general method prints only those parts which all derived classes (= value types) do have in common, i.e. the type of relationship, the value type and the (optional) concept name. A typical output looks like this: has concept mod CODE: (,,"Concept")
stream | output stream to which the content item should be printed |
flags | flag used to customize the output (see DSRTypes::PF_xxx) |
Reimplemented in DSRTextTreeNode, DSRContainerTreeNode, DSRByReferenceTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRPNameTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, DSRWaveformTreeNode, DSRCodeTreeNode, DSRNumTreeNode, and DSRCompositeTreeNode.
virtual OFCondition DSRDocumentTreeNode::read | ( | DcmItem & | dataset, |
const DSRIODConstraintChecker * | constraintChecker, | ||
const size_t | flags | ||
) | [virtual] |
read content item from dataset.
A number of readXXX() methods are called (see "protected" part) in order to retrieve all possibly nested content items from the dataset.
dataset | DICOM dataset from which the content item should be read |
constraintChecker | checks relationship content constraints of the associated IOD |
flags | flag used to customize the reading process (see DSRTypes::RF_xxx) |
virtual OFCondition DSRDocumentTreeNode::readContentItem | ( | DcmItem & | dataset | ) | [protected, virtual] |
read content item (value) from dataset.
This method does nothing for this base class, but derived classes overwrite it to read the contents according to their value type.
dataset | DICOM dataset from which the content item should be read |
Reimplemented in DSRContainerTreeNode, DSRByReferenceTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRTimeTreeNode, DSRPNameTreeNode, DSRTextTreeNode, DSRImageTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRUIDRefTreeNode, DSRWaveformTreeNode, DSRCodeTreeNode, DSRNumTreeNode, and DSRCompositeTreeNode.
OFCondition DSRDocumentTreeNode::readContentSequence | ( | DcmItem & | dataset, |
const DSRIODConstraintChecker * | constraintChecker, | ||
const OFString & | posString, | ||
const size_t | flags | ||
) | [protected] |
read content sequence
dataset | DICOM dataset from which the data should be read |
constraintChecker | checks relationship content constraints of the associated IOD |
posString | location of the current content item (e.g. "1.2.3") |
flags | flag used to customize the reading process (see DSRTypes::RF_xxx) |
OFCondition DSRDocumentTreeNode::readDocumentContentMacro | ( | DcmItem & | dataset, |
const OFString & | posString, | ||
const size_t | flags | ||
) | [protected] |
read document content macro
dataset | DICOM dataset from which the data should be read |
posString | location of the current content item (e.g. "1.2.3") |
flags | flag used to customize the reading process (see DSRTypes::RF_xxx) |
OFCondition DSRDocumentTreeNode::readDocumentRelationshipMacro | ( | DcmItem & | dataset, |
const DSRIODConstraintChecker * | constraintChecker, | ||
const OFString & | posString, | ||
const size_t | flags | ||
) | [protected] |
read document relationship macro
dataset | DICOM dataset from which the data should be read |
constraintChecker | checks relationship content constraints of the associated IOD |
posString | location of the current content item (e.g. "1.2.3") |
flags | flag used to customize the reading process (see DSRTypes::RF_xxx) |
OFCondition DSRDocumentTreeNode::readSRDocumentContentModule | ( | DcmItem & | dataset, |
const DSRIODConstraintChecker * | constraintChecker, | ||
const size_t | flags | ||
) | [protected] |
read SR document content module
dataset | DICOM dataset from which the data should be read |
constraintChecker | checks relationship content constraints of the associated IOD |
flags | flag used to customize the reading process (see DSRTypes::RF_xxx) |
virtual OFCondition DSRDocumentTreeNode::readXML | ( | const DSRXMLDocument & | doc, |
DSRXMLCursor | cursor, | ||
const E_DocumentType | documentType, | ||
const size_t | flags | ||
) | [virtual] |
read general XML document tree node data
doc | document containing the XML file content |
cursor | cursor pointing to the starting node |
documentType | type of the document to be read (used for debug output only) |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
virtual OFCondition DSRDocumentTreeNode::readXMLContentItem | ( | const DSRXMLDocument & | doc, |
DSRXMLCursor | cursor | ||
) | [protected, virtual] |
read content item specific XML data.
This method does nothing for this base class, but derived classes overwrite it to read the contents according to their value type.
doc | document containing the XML file content |
cursor | cursor pointing to the starting node |
Reimplemented in DSRContainerTreeNode, DSRByReferenceTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRTimeTreeNode, DSRPNameTreeNode, DSRTextTreeNode, DSRImageTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRUIDRefTreeNode, DSRWaveformTreeNode, DSRCodeTreeNode, DSRNumTreeNode, and DSRCompositeTreeNode.
remove digital signatures from content item.
This method clears the MACParametersSequence and the DigitalSignaturesSequence for the current content item which have been filled during reading.
virtual OFCondition DSRDocumentTreeNode::renderHTML | ( | STD_NAMESPACE ostream & | docStream, |
STD_NAMESPACE ostream & | annexStream, | ||
const size_t | nestingLevel, | ||
size_t & | annexNumber, | ||
const size_t | flags | ||
) | const [virtual] |
render content item in HTML/XHTML format.
After rendering the current content item all child nodes (if any) are also rendered (see renderHTMLChildNodes() for details).
docStream | output stream to which the main HTML/XHTML document is written |
annexStream | output stream to which the HTML/XHTML document annex is written |
nestingLevel | current nesting level. Used to render section headings. |
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 DSRContainerTreeNode.
OFCondition DSRDocumentTreeNode::renderHTMLChildNodes | ( | STD_NAMESPACE ostream & | docStream, |
STD_NAMESPACE ostream & | annexStream, | ||
const size_t | nestingLevel, | ||
size_t & | annexNumber, | ||
const size_t | flags | ||
) | const [protected] |
render child nodes 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 |
nestingLevel | current nesting level. Used to render section headings. |
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) |
OFCondition DSRDocumentTreeNode::renderHTMLConceptName | ( | STD_NAMESPACE ostream & | docStream, |
const size_t | flags | ||
) | const [protected] |
render concept name in HTML/XHTML format.
If the optional observation datetime field is valid (not empty) it is also rendered.
docStream | output stream to which the main HTML/XHTML document is written |
flags | flag used to customize the output (see DSRTypes::HF_xxx) |
virtual OFCondition DSRDocumentTreeNode::renderHTMLContentItem | ( | STD_NAMESPACE ostream & | docStream, |
STD_NAMESPACE ostream & | annexStream, | ||
const size_t | nestingLevel, | ||
size_t & | annexNumber, | ||
const size_t | flags | ||
) | const [protected, virtual] |
render content item (value) in HTML/XHTML format.
This method does nothing for this base class, but derived classes overwrite it to render the contents according to their value type.
docStream | output stream to which the main HTML/XHTML document is written |
annexStream | output stream to which the HTML/XHTML document annex is written |
nestingLevel | current nesting level. Used to render section headings. |
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 DSRContainerTreeNode, DSRByReferenceTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRTimeTreeNode, DSRPNameTreeNode, DSRTextTreeNode, DSRImageTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRUIDRefTreeNode, DSRWaveformTreeNode, DSRCodeTreeNode, DSRNumTreeNode, and DSRCompositeTreeNode.
virtual OFCondition DSRDocumentTreeNode::setConceptName | ( | const DSRCodedEntryValue & | conceptName | ) | [virtual] |
set the concept name.
Code describing the concept represented by this content item. Also conveys the value of document title and section headings in documents. If the new code is invalid the current one is not replaced. An empty code can be used to clear the current concept name.
conceptName | code to be set as the new concept name (checked before set) |
Reimplemented in DSRByReferenceTreeNode.
void DSRDocumentTreeNode::setMark | ( | const OFBool | flag | ) | [inline] |
mark/unmark the current content item.
See explanation for method 'isMarked' for details.
flag | mark item if OFTrue, unmark otherwise |
virtual OFCondition DSRDocumentTreeNode::setObservationDateTime | ( | const OFString & | observationDateTime | ) | [virtual] |
set observation date time.
This is the date and time on which this content item was completed. Might be empty if the date and time do not differ from the content date and time, see DSRDocument. Please use the correct DICOM format (YYYYMMDDHHMMSS) or an empty string to clear the current value. Currently no check is performed on the parameter value!
observationDateTime | value to be set (might be an empty string) |
Reimplemented in DSRByReferenceTreeNode.
virtual OFCondition DSRDocumentTreeNode::setObservationUID | ( | const OFString & | observationUID | ) | [virtual] |
set observation unique identifier.
The UID represents the semantic content of the observation; an encoding of the same observation with the same context into another representation may use the same UID. Please use the correct DICOM format (VR=UI) or an empty string to clear the current value. Currently no check is performed on the parameter value!
observationUID | value to be set (might be an empty string) |
Reimplemented in DSRByReferenceTreeNode.
void DSRDocumentTreeNode::setReferenceTarget | ( | const OFBool | isTarget = OFTrue | ) | [inline] |
specify whether the current content item is target of a by-reference relationship
isTarget | OFTrue if the content item is target (default), OFFalse otherwise |
virtual OFCondition DSRDocumentTreeNode::setTemplateIdentification | ( | const OFString & | templateIdentifier, |
const OFString & | mappingResource | ||
) | [virtual] |
set template identifier and mapping resource.
The identification is valid if both values are either present (non-empty) or absent (empty). See getTemplateIdentification() for details.
templateIdentifier | identifier of the template to be set (VR=CS) |
mappingResource | mapping resource that defines the template (VR=CS) |
Reimplemented in DSRByReferenceTreeNode.
virtual OFCondition DSRDocumentTreeNode::write | ( | DcmItem & | dataset, |
DcmStack * | markedItems = NULL |
||
) | [virtual] |
write content item to dataset.
A number of writeXXX() methods are called (see "protected" part) in order to write all possibly nested content items to the dataset.
dataset | DICOM dataset to which the content item should be written |
markedItems | optional stack where pointers to all 'marked' content items (DICOM datasets/items) are added to during the write process. Can be used to digitally sign parts of the document tree. |
virtual OFCondition DSRDocumentTreeNode::writeContentItem | ( | DcmItem & | dataset | ) | const [protected, virtual] |
write content item (value) to dataset.
This method does nothing for this base class, but derived classes overwrite it to write the contents according to their value type.
dataset | DICOM dataset to which the content item should be written |
Reimplemented in DSRContainerTreeNode, DSRByReferenceTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRTimeTreeNode, DSRPNameTreeNode, DSRTextTreeNode, DSRImageTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRUIDRefTreeNode, DSRWaveformTreeNode, DSRCodeTreeNode, DSRNumTreeNode, and DSRCompositeTreeNode.
OFCondition DSRDocumentTreeNode::writeContentSequence | ( | DcmItem & | dataset, |
DcmStack * | markedItems | ||
) | const [protected] |
write content sequence
dataset | DICOM dataset to which the data should be written |
markedItems | optional stack where pointers to all 'marked' content items (DICOM datasets/items) are added to during the write process. |
OFCondition DSRDocumentTreeNode::writeDocumentContentMacro | ( | DcmItem & | dataset | ) | const [protected] |
write document content macro
dataset | DICOM dataset to which the data should be written |
OFCondition DSRDocumentTreeNode::writeDocumentRelationshipMacro | ( | DcmItem & | dataset, |
DcmStack * | markedItems | ||
) | [protected] |
write document relationship macro
dataset | DICOM dataset to which the data should be written |
markedItems | optional stack where pointers to all 'marked' content items (DICOM datasets/items) are added to during the write process. |
OFCondition DSRDocumentTreeNode::writeSRDocumentContentModule | ( | DcmItem & | dataset, |
DcmStack * | markedItems | ||
) | [protected] |
write SR document content module
dataset | DICOM dataset to which the data should be written |
markedItems | optional stack where pointers to all 'marked' content items (DICOM datasets/items) are added to during the write process. |
virtual OFCondition DSRDocumentTreeNode::writeXML | ( | STD_NAMESPACE ostream & | stream, |
const size_t | flags | ||
) | const [virtual] |
write content item 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 DSRTextTreeNode, DSRContainerTreeNode, DSRByReferenceTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRPNameTreeNode, DSRSCoord3DTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, DSRWaveformTreeNode, DSRCodeTreeNode, DSRNumTreeNode, and DSRCompositeTreeNode.
void DSRDocumentTreeNode::writeXMLItemEnd | ( | STD_NAMESPACE ostream & | stream, |
const size_t | flags | ||
) | const [protected] |
write common item start (XML tag)
stream | output stream to which the XML document is written |
flags | flag used to customize the output (see DSRTypes::XF_xxx) |
void DSRDocumentTreeNode::writeXMLItemStart | ( | STD_NAMESPACE ostream & | stream, |
const size_t | flags, | ||
const OFBool | closingBracket = OFTrue |
||
) | const [protected] |
write common item start (XML tag)
stream | output stream to which the XML document is written |
flags | flag used to customize the output (see DSRTypes::XF_xxx) |
closingBracket | write closing bracket of XML start tag if OFTrue, otherwise the bracket has to be closed in the calling method |