Inheritance diagram for DSRDocumentTreeNode:
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 (ostream &stream, const size_t flags) const |
print content item. | |
virtual OFCondition | read (DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const size_t flags, OFConsole *logStream=NULL) |
read content item from dataset. | |
virtual OFCondition | write (DcmItem &dataset, DcmStack *markedItems=NULL, OFConsole *logStream=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 (ostream &stream, const size_t flags, OFConsole *logStream=NULL) const |
write content item in XML format | |
virtual OFCondition | renderHTML (ostream &docStream, ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags, OFConsole *logStream=NULL) const |
render content item in HTML 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 an by-reference relationship | |
void | setReferenceTarget (const OFBool isTarget=OFTrue) |
specify whether the current content item is target of an 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. | |
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. | |
virtual OFBool | containsExtendedCharacters () const |
check if this tree node contains non-ASCII characters in one of the strings affected by SpecificCharacterSet in DICOM | |
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, OFConsole *logStream) |
read content item (value) from dataset. | |
virtual OFCondition | writeContentItem (DcmItem &dataset, OFConsole *logStream) const |
write content item (value) to dataset. | |
virtual OFCondition | readXMLContentItem (const DSRXMLDocument &doc, DSRXMLCursor cursor) |
read content item specific XML data. | |
virtual OFCondition | renderHTMLContentItem (ostream &docStream, ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags, OFConsole *logStream) const |
render content item (value) in HTML format. | |
void | writeXMLItemStart (ostream &stream, const size_t flags, const OFBool closingBracket=OFTrue) const |
write common item start (XML tag) | |
void | writeXMLItemEnd (ostream &stream, const size_t flags) const |
write common item start (XML tag) | |
OFCondition | readSRDocumentContentModule (DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const size_t flags, OFConsole *logStream) |
read SR document content module | |
OFCondition | writeSRDocumentContentModule (DcmItem &dataset, DcmStack *markedItems, OFConsole *logStream) |
write SR document content module | |
OFCondition | readDocumentRelationshipMacro (DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const OFString &posString, const size_t flags, OFConsole *logStream) |
read document relationship macro | |
OFCondition | writeDocumentRelationshipMacro (DcmItem &dataset, DcmStack *markedItems, OFConsole *logStream) |
write document relationship macro | |
OFCondition | readDocumentContentMacro (DcmItem &dataset, const OFString &posString, const size_t flags, OFConsole *logStream) |
read document content macro | |
OFCondition | writeDocumentContentMacro (DcmItem &dataset, OFConsole *logStream) const |
write document content macro | |
OFCondition | readContentSequence (DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const OFString &posString, const size_t flags, OFConsole *logStream) |
read content sequence | |
OFCondition | writeContentSequence (DcmItem &dataset, DcmStack *markedItems, OFConsole *logStream) const |
write content sequence | |
OFCondition | renderHTMLConceptName (ostream &docStream, const size_t flags, OFConsole *logStream) const |
render concept name in HTML format. | |
OFCondition | renderHTMLChildNodes (ostream &docStream, ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags, OFConsole *logStream) const |
render child nodes in HTML 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 | 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 |
Definition at line 58 of file dsrdoctn.h.
|
constructor. The 'relationshipType' and 'valueType' can never be changed after the tree node has been created (therefore, the corresponding member variables are declared "const").
|
|
clear all member variables. This does not apply to the relationship and value type since they are never changed. Reimplemented in DSRCodeTreeNode, DSRCompositeTreeNode, DSRContainerTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRPNameTreeNode, DSRByReferenceTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, and DSRWaveformTreeNode. |
|
check if this tree node contains non-ASCII characters in one of the strings affected by SpecificCharacterSet in DICOM
Reimplemented in DSRCodeTreeNode, DSRNumTreeNode, DSRPNameTreeNode, and DSRTextTreeNode. |
|
create a new node and append it to the current one
|
|
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.
|
|
get reference to the concept name
Definition at line 275 of file dsrdoctn.h. References ConceptName. |
|
get pointer to the concept name
Definition at line 360 of file dsrdoctn.h. References ConceptName. |
|
get ID of the current tree node
Definition at line 251 of file dsrdoctn.h. References DSRTreeNode::Ident. |
|
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.
Definition at line 303 of file dsrdoctn.h. References ObservationDateTime. |
|
convert relationship type into a text used for HTML rendering
|
|
get relationship type of the current content item
Definition at line 259 of file dsrdoctn.h. References RelationshipType. |
|
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).
|
|
get value type of the current content item
Definition at line 267 of file dsrdoctn.h. References ValueType. |
|
check whether the current content item has any children
Definition at line 235 of file dsrdoctn.h. References DSRTreeNode::Down. |
|
check whether the current content item has any siblings
Definition at line 243 of file dsrdoctn.h. References DSRTreeNode::Next, and DSRTreeNode::Prev. |
|
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.
Definition at line 202 of file dsrdoctn.h. References MarkFlag. |
|
check whether the current content item is target of an by-reference relationship
Definition at line 219 of file dsrdoctn.h. References ReferenceTarget. |
|
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.
Reimplemented in DSRContainerTreeNode, DSRImageTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, and DSRWaveformTreeNode. |
|
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.
Definition at line 190 of file dsrdoctn.h. References DcmSequenceOfItems::card(), and DigitalSignatures. |
|
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 DSRCodeTreeNode, DSRCompositeTreeNode, DSRContainerTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRPNameTreeNode, DSRByReferenceTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, and DSRWaveformTreeNode. |
|
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")
Reimplemented in DSRCodeTreeNode, DSRCompositeTreeNode, DSRContainerTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRPNameTreeNode, DSRByReferenceTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, and DSRWaveformTreeNode. |
|
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.
|
|
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.
Reimplemented in DSRCodeTreeNode, DSRCompositeTreeNode, DSRContainerTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRPNameTreeNode, DSRByReferenceTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, and DSRWaveformTreeNode. |
|
read content sequence
|
|
read document content macro
|
|
read document relationship macro
|
|
read SR document content module
|
|
read general XML document tree node data
|
|
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.
Reimplemented in DSRCodeTreeNode, DSRCompositeTreeNode, DSRContainerTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRPNameTreeNode, DSRByReferenceTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, and DSRWaveformTreeNode. |
|
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. |
|
render content item in HTML format. After rendering the current content item all child nodes (if any) are also rendered (see renderHTMLChildNodes() for details).
Reimplemented in DSRContainerTreeNode. |
|
render child nodes in HTML format
|
|
render concept name in HTML format. If the optional observation datetime field is valid (not empty) it is also rendered.
|
|
render content item (value) in HTML format. This method does nothing for this base class, but derived classes overwrite it to render the contents according to their value type.
Reimplemented in DSRCodeTreeNode, DSRCompositeTreeNode, DSRContainerTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRPNameTreeNode, DSRByReferenceTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, and DSRWaveformTreeNode. |
|
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.
Reimplemented in DSRByReferenceTreeNode. |
|
mark/unmark the current content item. See explanation for method 'isMarked' for details.
Definition at line 211 of file dsrdoctn.h. References MarkFlag. |
|
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!
Reimplemented in DSRByReferenceTreeNode. |
|
specify whether the current content item is target of an by-reference relationship
Definition at line 227 of file dsrdoctn.h. References ReferenceTarget. |
|
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.
Reimplemented in DSRByReferenceTreeNode. |
|
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.
|
|
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.
Reimplemented in DSRCodeTreeNode, DSRCompositeTreeNode, DSRContainerTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRPNameTreeNode, DSRByReferenceTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, and DSRWaveformTreeNode. |
|
write content sequence
|
|
write document content macro
|
|
write document relationship macro
|
|
write SR document content module
|
|
write content item in XML format
Reimplemented in DSRCodeTreeNode, DSRCompositeTreeNode, DSRContainerTreeNode, DSRDateTreeNode, DSRDateTimeTreeNode, DSRImageTreeNode, DSRNumTreeNode, DSRPNameTreeNode, DSRByReferenceTreeNode, DSRSCoordTreeNode, DSRTCoordTreeNode, DSRTextTreeNode, DSRTimeTreeNode, DSRUIDRefTreeNode, and DSRWaveformTreeNode. |
|
write common item start (XML tag)
|
|
write common item start (XML tag)
|