DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DSRReferencedInstanceList Class Reference

Class that manages a list of SOP instances significantly related to the current SR document. More...

+ Inheritance diagram for DSRReferencedInstanceList:

List of all members.

Classes

struct  ItemStruct
 Internal structure defining the list items. More...

Public Member Functions

 DSRReferencedInstanceList ()
 constructor (default)
 ~DSRReferencedInstanceList ()
 destructor
void clear ()
 clear the list
OFBool empty () const
 check whether list is empty
size_t getNumberOfItems () const
 get number of items stored in the list
OFCondition read (DcmItem &dataset)
 read list of items from the referenced instance sequence
OFCondition write (DcmItem &dataset) const
 write list of items to the referenced instance sequence.
OFCondition readXML (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags)
 read list of items from XML document
OFCondition writeXML (STD_NAMESPACE ostream &stream, const size_t flags=0) const
 write current list in XML format
OFCondition addItem (const OFString &sopClassUID, const OFString &instanceUID)
 add new entry to the list of instances (if not already existent).
OFCondition removeItem ()
 remove the current item from the list.
OFCondition removeItem (const OFString &sopClassUID, const OFString &instanceUID)
 remove the specified item from the list.
OFCondition gotoItem (const OFString &sopClassUID, const OFString &instanceUID)
 select the specified item as the current one
OFCondition gotoFirstItem ()
 select the first item in the list
OFCondition gotoNextItem ()
 select the next item in the list
const OFStringgetSOPClassUID (OFString &stringValue) const
 get the SOP class UID of the currently selected entry
const OFStringgetSOPInstanceUID (OFString &stringValue) const
 get the SOP instance UID of the currently selected entry
OFCondition getPurposeOfReference (DSRCodedEntryValue &codeValue) const
 get purpose of reference code of the currently selected entry
OFCondition setPurposeOfReference (const DSRCodedEntryValue &codeValue)
 set purpose of reference code of the currently selected entry.

Protected Member Functions

OFCondition addItem (const OFString &sopClassUID, const OFString &instanceUID, ItemStruct *&item)
 add the specified SOP instance to the list (if not existent)
ItemStructgetCurrentItem () const
 get pointer to currently selected item structure (if any)

Private Member Functions

 OFListIterator (ItemStruct *) Iterator
 internal cursor to current (selected) list item
 DSRReferencedInstanceList (const DSRReferencedInstanceList &)
DSRReferencedInstanceListoperator= (const DSRReferencedInstanceList &)

Private Attributes

OFList< ItemStruct * > ItemList
 list of items

Detailed Description

Class that manages a list of SOP instances significantly related to the current SR document.

An implementation of the Referenced Instance Sequence.


Member Function Documentation

OFCondition DSRReferencedInstanceList::addItem ( const OFString sopClassUID,
const OFString instanceUID 
)

add new entry to the list of instances (if not already existent).

Finally, the specified item is selected as the current one.

Parameters:
sopClassUIDSOP class UID of the entry to be added
instanceUIDSOP instance UID of the entry to be added
Returns:
status, EC_Normal if successful, an error code otherwise
OFCondition DSRReferencedInstanceList::addItem ( const OFString sopClassUID,
const OFString instanceUID,
ItemStruct *&  item 
) [protected]

add the specified SOP instance to the list (if not existent)

Parameters:
sopClassUIDSOP class UID of the entry to be added
instanceUIDSOP instance UID of the entry to be added
itemreference to item pointer (result variable)
Returns:
status, EC_Normal if successful, an error code otherwise

check whether list is empty

Returns:
OFTrue if list is empty, OFFalse otherwise

get pointer to currently selected item structure (if any)

Returns:
pointer to the item structure if successful, NULL otherwise

get number of items stored in the list

Returns:
number of items

get purpose of reference code of the currently selected entry

Parameters:
codeValuevariable where a copy of the code should be stored
Returns:
status, EC_Normal if successful, an error code otherwise

get the SOP class UID of the currently selected entry

Parameters:
stringValuereference to string variable in which the result is stored
Returns:
reference to the resulting string (might be empty)

get the SOP instance UID of the currently selected entry

Parameters:
stringValuereference to string variable in which the result is stored
Returns:
reference to the resulting string (might be empty)

select the first item in the list

Returns:
status, EC_Normal if successful, an error code otherwise. (e.g. if the list is empty)
OFCondition DSRReferencedInstanceList::gotoItem ( const OFString sopClassUID,
const OFString instanceUID 
)

select the specified item as the current one

Parameters:
sopClassUIDSOP class UID of the item to be selected
instanceUIDSOP instance UID of the item to be selected
Returns:
status, EC_Normal if successful, an error code otherwise

select the next item in the list

Returns:
status, EC_Normal if successful, an error code otherwise. (e.g. if the end of the list has been reached)

read list of items from the referenced instance sequence

Parameters:
datasetDICOM dataset from which the data should be read
Returns:
status, EC_Normal if successful, an error code otherwise
OFCondition DSRReferencedInstanceList::readXML ( const DSRXMLDocument doc,
DSRXMLCursor  cursor,
const size_t  flags 
)

read list of items from XML document

Parameters:
docdocument containing the XML file content
cursorcursor pointing to the starting node
flagsoptional flag used to customize the reading process (see DSRTypes::XF_xxx)
Returns:
status, EC_Normal if successful, an error code otherwise

remove the current item from the list.

After successful removal the cursor is set to the next valid position.

Returns:
status, EC_Normal if successful, an error code otherwise
OFCondition DSRReferencedInstanceList::removeItem ( const OFString sopClassUID,
const OFString instanceUID 
)

remove the specified item from the list.

After successful removal the cursor is set to the next valid position.

Parameters:
sopClassUIDSOP class UID of the item to be removed
instanceUIDSOP instance UID of the item to be removed
Returns:
status, EC_Normal if successful, an error code otherwise

set purpose of reference code of the currently selected entry.

The Context Group with CID 7006 (SR Document Purposes of Reference) contains a list of appropriate code values. See DICOM standard for details.

Parameters:
codeValuevalue to be set (not checked for validity)
Returns:
status, EC_Normal if successful, an error code otherwise

write list of items to the referenced instance sequence.

Does nothing if list is empty.

Parameters:
datasetDICOM dataset to which the data should be written
Returns:
status, EC_Normal if successful, an error code otherwise
OFCondition DSRReferencedInstanceList::writeXML ( STD_NAMESPACE ostream &  stream,
const size_t  flags = 0 
) const

write current list in XML format

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

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