DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions
DSRPNameTreeNode Class Reference

Class for content item PNAME. More...

+ Inheritance diagram for DSRPNameTreeNode:

List of all members.

Public Member Functions

 DSRPNameTreeNode (const E_RelationshipType relationshipType)
 constructor
 DSRPNameTreeNode (const E_RelationshipType relationshipType, const OFString &stringValue)
 constructor
virtual ~DSRPNameTreeNode ()
 destructor
virtual void clear ()
 clear all member variables.
virtual OFBool isValid () const
 check whether the content item is valid.
virtual OFCondition print (STD_NAMESPACE ostream &stream, const size_t flags) const
 print content item.
virtual OFCondition writeXML (STD_NAMESPACE ostream &stream, const size_t flags) const
 write content item in XML format

Static Public Member Functions

static OFStringgetValueFromXMLNodeContent (const DSRXMLDocument &doc, DSRXMLCursor cursor, OFString &nameValue)
 get DICOM Person Name from XML elements.

Protected Member Functions

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

Private Member Functions

 DSRPNameTreeNode (const DSRPNameTreeNode &)
DSRPNameTreeNodeoperator= (const DSRPNameTreeNode &)

Detailed Description

Class for content item PNAME.


Constructor & Destructor Documentation

constructor

Parameters:
relationshipTypetype of relationship to the parent tree node. Should not be RT_invalid or RT_isRoot.
DSRPNameTreeNode::DSRPNameTreeNode ( const E_RelationshipType  relationshipType,
const OFString stringValue 
)

constructor

Parameters:
relationshipTypetype of relationship to the parent tree node. Should not be RT_invalid or RT_isRoot.
stringValueinitial string value to be set

Member Function Documentation

virtual void DSRPNameTreeNode::clear ( ) [virtual]

clear all member variables.

Please note that the content item might become invalid afterwards.

Reimplemented from DSRDocumentTreeNode.

static OFString& DSRPNameTreeNode::getValueFromXMLNodeContent ( const DSRXMLDocument doc,
DSRXMLCursor  cursor,
OFString nameValue 
) [static]

get DICOM Person Name from XML elements.

The five components of a DICOM Person Name (PN) are expected to be stored in the XML elements "prefix", "first", "middle", "last" and "suffix" as created by writeXML().

Parameters:
docdocument containing the XML file content
cursorcursor pointing to the starting node
nameValuereference to string object in which the value should be stored
Returns:
reference to string object (might be empty)
virtual OFBool DSRPNameTreeNode::isValid ( ) const [virtual]

check whether the content item is valid.

The content item is valid if the two base classes and the concept name are valid.

Returns:
OFTrue if tree node is valid, OFFalse otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRPNameTreeNode::print ( STD_NAMESPACE ostream &  stream,
const size_t  flags 
) const [virtual]

print content item.

A typical output looks like this: contains PNAME:(,,"Code")="Riesmeier^Joerg"

Parameters:
streamoutput stream to which the content item should be printed
flagsflag used to customize the output (see DSRTypes::PF_xxx)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRPNameTreeNode::readContentItem ( DcmItem dataset) [protected, virtual]

read content item (value) from dataset

Parameters:
datasetDICOM dataset from which the content item should be read
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRPNameTreeNode::readXMLContentItem ( const DSRXMLDocument doc,
DSRXMLCursor  cursor 
) [protected, virtual]

read content item specific XML data

Parameters:
docdocument containing the XML file content
cursorcursor pointing to the starting node
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRPNameTreeNode::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

Parameters:
docStreamoutput stream to which the main HTML/XHTML document is written
annexStreamoutput stream to which the HTML/XHTML document annex is written
nestingLevelcurrent nesting level. Used to render section headings.
annexNumberreference to the variable where the current annex number is stored. Value is increased automatically by 1 after a new entry has been added.
flagsflag used to customize the output (see DSRTypes::HF_xxx)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRPNameTreeNode::writeContentItem ( DcmItem dataset) const [protected, virtual]

write content item (value) to dataset

Parameters:
datasetDICOM dataset to which the content item should be written
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.

virtual OFCondition DSRPNameTreeNode::writeXML ( STD_NAMESPACE ostream &  stream,
const size_t  flags 
) const [virtual]

write content item in XML format

Parameters:
streamoutput stream to which the XML document is written
flagsflag used to customize the output (see DSRTypes::XF_xxx)
Returns:
status, EC_Normal if successful, an error code otherwise

Reimplemented from DSRDocumentTreeNode.


The documentation for this class was generated from the following file:


Generated on Tue May 15 2012 for DCMTK Version 3.6.1 20120515 by Doxygen 1.7.5.1-20111027