DSRSOPInstanceReferenceList Class Reference

Class for SOP instance reference lists. More...

Inheritance diagram for DSRSOPInstanceReferenceList:

DSRTypes List of all members.

Public Member Functions

 DSRSOPInstanceReferenceList (const DcmTagKey &sequence)
 constructor
 ~DSRSOPInstanceReferenceList ()
 destructor
void clear ()
 clear list of references
OFBool empty () const
 check whether list of references is empty
size_t getNumberOfInstances () const
 get number of instance stored in the list of references
OFCondition read (DcmItem &dataset)
 read list of referenced SOP instances.
OFCondition write (DcmItem &dataset) const
 write list of referenced SOP instances.
OFCondition readXML (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags)
 read list of references from XML document.
OFCondition writeXML (STD_NAMESPACE ostream &stream, const size_t flags=0) const
 write current list of references in XML format
OFCondition addItem (const OFString &studyUID, const OFString &seriesUID, const OFString &sopClassUID, const OFString &instanceUID)
 add the specified item to the list of references.
OFCondition addItem (DcmItem &dataset)
 add item from specified DICOM dataset to the list of references.
OFCondition removeItem ()
 remove the current item from the list of referenced SOP instances.
OFCondition removeItem (const OFString &sopClassUID, const OFString &instanceUID)
 remove the specified item from the list of references.
OFCondition removeItem (const OFString &studyUID, const OFString &seriesUID, const OFString &instanceUID)
 remove the specified item from the list of references.
OFCondition gotoItem (const OFString &sopClassUID, const OFString &instanceUID)
 select the specified item as the current one
OFCondition gotoItem (const OFString &studyUID, const OFString &seriesUID, 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 OFStringgetStudyInstanceUID (OFString &stringValue) const
 get the study instance UID of the currently selected entry
const OFStringgetSeriesInstanceUID (OFString &stringValue) const
 get the series instance UID of the currently selected entry
const OFStringgetSOPInstanceUID (OFString &stringValue) const
 get the SOP instance UID of the currently selected entry
const OFStringgetSOPClassUID (OFString &stringValue) const
 get the SOP class UID of the currently selected entry
const OFStringgetRetrieveAETitle (OFString &stringValue) const
 get the retrieve application entity title of the currently selected entry (optional).
const OFStringgetStorageMediaFileSetID (OFString &stringValue) const
 get the storage media file set ID of the currently selected entry (optional)
const OFStringgetStorageMediaFileSetUID (OFString &stringValue) const
 get the storage media file set UID of the currently selected entry (optional)
OFCondition setRetrieveAETitle (const OFString &value)
 set the retrieve application entity title of the currently selected entry.
OFCondition setStorageMediaFileSetID (const OFString &value)
 set the storage media file set ID of the currently selected entry
OFCondition setStorageMediaFileSetUID (const OFString &value)
 set the storage media file set UID of the currently selected entry

Protected Member Functions

StudyStructgotoStudy (const OFString &studyUID)
 set cursor to the specified study entry (if existent)
StudyStructgetCurrentStudy () const
 get pointer to currently selected study structure (if any)
SeriesStructgetCurrentSeries () const
 get pointer to currently selected series structure (if any)
InstanceStructgetCurrentInstance () const
 get pointer to currently selected instance structure (if any)
void removeIncompleteItems ()
 remove empty/incomplete items from the list.

Private Member Functions

 OFListIterator (StudyStruct *) Iterator
 internal cursor to current (selected) list item
 DSRSOPInstanceReferenceList (const DSRSOPInstanceReferenceList &)
DSRSOPInstanceReferenceListoperator= (const DSRSOPInstanceReferenceList &)

Private Attributes

const DcmTagKey SequenceTag
 DICOM tag specifying the attribute (sequence) of the reference list.
OFList< StudyStruct * > StudyList
 list of studies

Classes

struct  InstanceStruct
 Internal structure defining the instance list items. More...
struct  SeriesStruct
 Internal structure defining the series list items. More...
struct  StudyStruct
 Internal structure defining the study list items. More...

Detailed Description

Class for SOP instance reference lists.

Definition at line 53 of file dsrsoprf.h.


Constructor & Destructor Documentation

DSRSOPInstanceReferenceList::DSRSOPInstanceReferenceList ( const DcmTagKey sequence  ) 

constructor

Parameters:
sequence DICOM tag specifying the attribute (sequence) of the reference list


Member Function Documentation

OFBool DSRSOPInstanceReferenceList::empty (  )  const

check whether list of references is empty

Returns:
OFTrue if list is empty, OFFalse otherwise

size_t DSRSOPInstanceReferenceList::getNumberOfInstances (  )  const

get number of instance stored in the list of references

Returns:
number of instances

OFCondition DSRSOPInstanceReferenceList::read ( DcmItem dataset  ) 

read list of referenced SOP instances.

The hierarchical structure is automatically reorganized in a way that each study, each series (within a study) and each instance (within a series) only exist once, i.e. the structure might look different when written back to a dataset. However, the content is identical and this way of storing information saves storage space.

Parameters:
dataset DICOM dataset from which the data should be read
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::write ( DcmItem dataset  )  const

write list of referenced SOP instances.

Does nothing if list is empty.

Parameters:
dataset DICOM dataset to which the data should be written
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::readXML ( const DSRXMLDocument doc,
DSRXMLCursor  cursor,
const size_t  flags 
)

read list of references from XML document.

The hierarchical structure is automatically reorganized in a way that each study, each series (within a study) and each instance (within a series) only exist once, i.e. the structure might look different when written back to a dataset. However, the content is identical and this way of storing information saves storage space.

Parameters:
doc document containing the XML file content
cursor cursor pointing to the starting node
flags optional flag used to customize the reading process (see DSRTypes::XF_xxx)
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::writeXML ( STD_NAMESPACE ostream &  stream,
const size_t  flags = 0 
) const

write current list of references in XML format

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

OFCondition DSRSOPInstanceReferenceList::addItem ( const OFString studyUID,
const OFString seriesUID,
const OFString sopClassUID,
const OFString instanceUID 
)

add the specified item to the list of references.

Internally the item is inserted into the hierarchical structure of studies, series and instances, if not already contained in the list. In any case the specified item is selected as the current one.

Parameters:
studyUID study instance UID of the entry to be added
seriesUID series instance UID of the entry to be added
sopClassUID SOP class UID of the entry to be added
instanceUID SOP instance UID of the entry to be added
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::addItem ( DcmItem dataset  ) 

add item from specified DICOM dataset to the list of references.

Internally an item representing the given dataset is inserted into the hierarchical structure of studies, series and instances, if not already contained in the list. In any case the specified item is selected as the current one.

Parameters:
dataset reference to DICOM dataset from which the relevant UIDs are retrieved
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::removeItem (  ) 

remove the current item from the list of referenced SOP instances.

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

Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::removeItem ( const OFString sopClassUID,
const OFString instanceUID 
)

remove the specified item from the list of references.

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

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

OFCondition DSRSOPInstanceReferenceList::removeItem ( const OFString studyUID,
const OFString seriesUID,
const OFString instanceUID 
)

remove the specified item from the list of references.

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

Parameters:
studyUID study instance UID of the item to be removed
seriesUID series instance UID of the item to be removed
instanceUID SOP instance UID of the item to be removed
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::gotoItem ( const OFString sopClassUID,
const OFString instanceUID 
)

select the specified item as the current one

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

OFCondition DSRSOPInstanceReferenceList::gotoItem ( const OFString studyUID,
const OFString seriesUID,
const OFString instanceUID 
)

select the specified item as the current one

Parameters:
studyUID study instance UID of the item to be selected
seriesUID series instance UID of the item to be selected
instanceUID SOP instance UID of the item to be selected
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::gotoFirstItem (  ) 

select the first item in the list.

That means the first instance in the first series of the first study is selected (if available).

Returns:
status, EC_Normal if successful, an error code otherwise. (e.g. if the list is empty)

OFCondition DSRSOPInstanceReferenceList::gotoNextItem (  ) 

select the next item in the list.

That means the next instance in the current series, or the first instance in the next series, or the first instance in the first series of the next study is selected (if available). The combination of this function and gotoFirstItem() allows to iterate over all referenced SOP instances.

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

const OFString& DSRSOPInstanceReferenceList::getStudyInstanceUID ( OFString stringValue  )  const

get the study instance UID of the currently selected entry

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

const OFString& DSRSOPInstanceReferenceList::getSeriesInstanceUID ( OFString stringValue  )  const

get the series instance UID of the currently selected entry

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

const OFString& DSRSOPInstanceReferenceList::getSOPInstanceUID ( OFString stringValue  )  const

get the SOP instance UID of the currently selected entry

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

const OFString& DSRSOPInstanceReferenceList::getSOPClassUID ( OFString stringValue  )  const

get the SOP class UID of the currently selected entry

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

const OFString& DSRSOPInstanceReferenceList::getRetrieveAETitle ( OFString stringValue  )  const

get the retrieve application entity title of the currently selected entry (optional).

The resulting string may contain multiple values separated by a backslash ("\").

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

const OFString& DSRSOPInstanceReferenceList::getStorageMediaFileSetID ( OFString stringValue  )  const

get the storage media file set ID of the currently selected entry (optional)

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

const OFString& DSRSOPInstanceReferenceList::getStorageMediaFileSetUID ( OFString stringValue  )  const

get the storage media file set UID of the currently selected entry (optional)

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

OFCondition DSRSOPInstanceReferenceList::setRetrieveAETitle ( const OFString value  ) 

set the retrieve application entity title of the currently selected entry.

Multiple values are to be separated by a backslash ("\").

Parameters:
value string value to be set (use empty string to omit optional attribute)
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::setStorageMediaFileSetID ( const OFString value  ) 

set the storage media file set ID of the currently selected entry

Parameters:
value string value to be set (use empty string to omit optional attribute)
Returns:
status, EC_Normal if successful, an error code otherwise

OFCondition DSRSOPInstanceReferenceList::setStorageMediaFileSetUID ( const OFString value  ) 

set the storage media file set UID of the currently selected entry

Parameters:
value string value to be set (use empty string to omit optional attribute)
Returns:
status, EC_Normal if successful, an error code otherwise

StudyStruct* DSRSOPInstanceReferenceList::gotoStudy ( const OFString studyUID  )  [protected]

set cursor to the specified study entry (if existent)

Parameters:
studyUID study instance UID of the entry to be searched for
Returns:
pointer to the study structure if successful, NULL otherwise

StudyStruct* DSRSOPInstanceReferenceList::getCurrentStudy (  )  const [protected]

get pointer to currently selected study structure (if any)

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

SeriesStruct* DSRSOPInstanceReferenceList::getCurrentSeries (  )  const [protected]

get pointer to currently selected series structure (if any)

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

InstanceStruct* DSRSOPInstanceReferenceList::getCurrentInstance (  )  const [protected]

get pointer to currently selected instance structure (if any)

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

void DSRSOPInstanceReferenceList::removeIncompleteItems (  )  [protected]

remove empty/incomplete items from the list.

(e.g. series with no instances or studies with no series) Please note that this function modifies the value of 'Iterator'.


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


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1