DCMTK
Version 3.6.1 20120515
OFFIS DICOM Toolkit
|
Class for SOP instance reference lists. More...
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... | |
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 OFString & | getStudyInstanceUID (OFString &stringValue) const |
get the study instance UID of the currently selected entry | |
const OFString & | getSeriesInstanceUID (OFString &stringValue) const |
get the series instance UID of the currently selected entry | |
const OFString & | getSOPInstanceUID (OFString &stringValue) const |
get the SOP instance UID of the currently selected entry | |
const OFString & | getSOPClassUID (OFString &stringValue) const |
get the SOP class UID of the currently selected entry | |
const OFString & | getRetrieveAETitle (OFString &stringValue) const |
get the retrieve application entity title of the currently selected entry (optional). | |
const OFString & | getStorageMediaFileSetID (OFString &stringValue) const |
get the storage media file set ID of the currently selected entry (optional) | |
const OFString & | getStorageMediaFileSetUID (OFString &stringValue) const |
get the storage media file set UID of the currently selected entry (optional) | |
OFCondition | getPurposeOfReference (DSRCodedEntryValue &codeValue) const |
get purpose of reference code 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 | |
OFCondition | setPurposeOfReference (const DSRCodedEntryValue &codeValue) |
set purpose of reference code of the currently selected entry | |
Protected Member Functions | |
StudyStruct * | gotoStudy (const OFString &studyUID) |
set cursor to the specified study entry (if existent) | |
StudyStruct * | getCurrentStudy () const |
get pointer to currently selected study structure (if any) | |
SeriesStruct * | getCurrentSeries () const |
get pointer to currently selected series structure (if any) | |
InstanceStruct * | getCurrentInstance () 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 &) | |
DSRSOPInstanceReferenceList & | operator= (const DSRSOPInstanceReferenceList &) |
Private Attributes | |
const DcmTagKey | SequenceTag |
DICOM tag specifying the attribute (sequence) of the reference list. | |
OFList< StudyStruct * > | StudyList |
list of studies |
Class for SOP instance reference lists.
DSRSOPInstanceReferenceList::DSRSOPInstanceReferenceList | ( | const DcmTagKey & | sequence | ) |
constructor
sequence | DICOM tag specifying the attribute (sequence) of the reference list |
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.
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 |
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.
dataset | reference to DICOM dataset from which the relevant UIDs are retrieved |
OFBool DSRSOPInstanceReferenceList::empty | ( | ) | const |
check whether list of references is empty
InstanceStruct* DSRSOPInstanceReferenceList::getCurrentInstance | ( | ) | const [protected] |
get pointer to currently selected instance structure (if any)
SeriesStruct* DSRSOPInstanceReferenceList::getCurrentSeries | ( | ) | const [protected] |
get pointer to currently selected series structure (if any)
StudyStruct* DSRSOPInstanceReferenceList::getCurrentStudy | ( | ) | const [protected] |
get pointer to currently selected study structure (if any)
size_t DSRSOPInstanceReferenceList::getNumberOfInstances | ( | ) | const |
get number of instance stored in the list of references
OFCondition DSRSOPInstanceReferenceList::getPurposeOfReference | ( | DSRCodedEntryValue & | codeValue | ) | const |
get purpose of reference code of the currently selected entry (optional)
codeValue | variable where a copy of the code should be stored |
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 ("\").
stringValue | reference to string variable in which the result is stored |
const OFString& DSRSOPInstanceReferenceList::getSeriesInstanceUID | ( | OFString & | stringValue | ) | const |
get the series instance UID of the currently selected entry
stringValue | reference to string variable in which the result is stored |
const OFString& DSRSOPInstanceReferenceList::getSOPClassUID | ( | OFString & | stringValue | ) | const |
get the SOP class UID of the currently selected entry
stringValue | reference to string variable in which the result is stored |
const OFString& DSRSOPInstanceReferenceList::getSOPInstanceUID | ( | OFString & | stringValue | ) | const |
get the SOP instance UID of the currently selected entry
stringValue | reference to string variable in which the result is stored |
const OFString& DSRSOPInstanceReferenceList::getStorageMediaFileSetID | ( | OFString & | stringValue | ) | const |
get the storage media file set ID of the currently selected entry (optional)
stringValue | reference to string variable in which the result is stored |
const OFString& DSRSOPInstanceReferenceList::getStorageMediaFileSetUID | ( | OFString & | stringValue | ) | const |
get the storage media file set UID of the currently selected entry (optional)
stringValue | reference to string variable in which the result is stored |
const OFString& DSRSOPInstanceReferenceList::getStudyInstanceUID | ( | OFString & | stringValue | ) | const |
get the study instance UID of the currently selected entry
stringValue | reference to string variable in which the result is stored |
select the first item in the list.
That means the first instance in the first series of the first study is selected (if available).
OFCondition DSRSOPInstanceReferenceList::gotoItem | ( | const OFString & | sopClassUID, |
const OFString & | instanceUID | ||
) |
select the specified item as the current one
sopClassUID | SOP class UID of the item to be selected |
instanceUID | SOP instance UID of the item to be selected |
OFCondition DSRSOPInstanceReferenceList::gotoItem | ( | const OFString & | studyUID, |
const OFString & | seriesUID, | ||
const OFString & | instanceUID | ||
) |
select the specified item as the current one
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 |
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.
StudyStruct* DSRSOPInstanceReferenceList::gotoStudy | ( | const OFString & | studyUID | ) | [protected] |
set cursor to the specified study entry (if existent)
studyUID | study instance UID of the entry to be searched for |
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.
dataset | DICOM dataset from which the data should be read |
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.
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) |
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'.
remove the current item from the list of referenced SOP instances.
After successful removal the cursor is set to the next valid position.
OFCondition DSRSOPInstanceReferenceList::removeItem | ( | const OFString & | sopClassUID, |
const OFString & | instanceUID | ||
) |
remove the specified item from the list of references.
After successful removal the cursor is set to the next valid position.
sopClassUID | SOP class UID of the item to be removed |
instanceUID | SOP instance UID of the item to be removed |
OFCondition DSRSOPInstanceReferenceList::removeItem | ( | const OFString & | studyUID, |
const OFString & | seriesUID, | ||
const OFString & | instanceUID | ||
) |
remove the specified item from the list of references.
After successful removal the cursor is set to the next valid position.
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 |
OFCondition DSRSOPInstanceReferenceList::setPurposeOfReference | ( | const DSRCodedEntryValue & | codeValue | ) |
set purpose of reference code of the currently selected entry
codeValue | value to be set (use empty code to omit optional attribute) |
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 ("\").
value | string value to be set (use empty string to omit optional attribute) |
OFCondition DSRSOPInstanceReferenceList::setStorageMediaFileSetID | ( | const OFString & | value | ) |
set the storage media file set ID of the currently selected entry
value | string value to be set (use empty string to omit optional attribute) |
OFCondition DSRSOPInstanceReferenceList::setStorageMediaFileSetUID | ( | const OFString & | value | ) |
set the storage media file set UID of the currently selected entry
value | string value to be set (use empty string to omit optional attribute) |
OFCondition DSRSOPInstanceReferenceList::write | ( | DcmItem & | dataset | ) | const |
write list of referenced SOP instances.
Does nothing if list is empty.
dataset | DICOM dataset to which the data should be written |
OFCondition DSRSOPInstanceReferenceList::writeXML | ( | STD_NAMESPACE ostream & | stream, |
const size_t | flags = 0 |
||
) | const |
write current list of references in XML format
stream | output stream to which the XML data is written |
flags | optional flag used to customize the output (see DSRTypes::XF_xxx) |