OFFIS DCMTK  Version 3.6.0
Public Member Functions | List of all members
DSRGraphicDataList Class Reference

Class for graphic data lists. More...

Inheritance diagram for DSRGraphicDataList:
[legend]
Collaboration diagram for DSRGraphicDataList:
[legend]

Public Member Functions

 DSRGraphicDataList ()
 default constructor
 
 DSRGraphicDataList (const DSRGraphicDataList &lst)
 copy constructor
 
virtual ~DSRGraphicDataList ()
 destructor
 
DSRGraphicDataListoperator= (const DSRGraphicDataList &lst)
 assignment operator
 
OFCondition print (STD_NAMESPACE ostream &stream, const size_t flags=0, const char pairSeparator= '/', const char itemSeparator= ',') const
 print list of graphic data.
 
OFCondition read (DcmItem &dataset)
 read list of graphic data
 
OFCondition write (DcmItem &dataset) const
 write list of graphic data
 
const DSRGraphicDataItemgetItem (const size_t idx) const
 get reference to the specified item
 
OFCondition getItem (const size_t idx, Float32 &column, Float32 &row) const
 get copy of the specified value pair
 
void addItem (const Float32 column, const Float32 row)
 add value pair to the list
 
OFCondition putString (const char *stringValue)
 put list of graphic data as a string.
 
- Public Member Functions inherited from DSRListOfItems< DSRGraphicDataItem >
 DSRListOfItems ()
 default constructor
 
 DSRListOfItems (const DSRListOfItems< DSRGraphicDataItem > &lst)
 copy constructor
 
virtual ~DSRListOfItems ()
 destructor
 
DSRListOfItems
< DSRGraphicDataItem > & 
operator= (const DSRListOfItems< DSRGraphicDataItem > &lst)
 assignment operator
 
void clear ()
 clear all internal variables
 
OFBool isEmpty () const
 check whether the list is empty
 
size_t getNumberOfItems () const
 get number of items contained in the list
 
OFBool isElement (const DSRGraphicDataItem &item) const
 check whether specified item is contained in the list
 
const DSRGraphicDataItemgetItem (const size_t idx) const
 get reference to the specified item
 
OFCondition getItem (const size_t idx, DSRGraphicDataItem &item) const
 get copy of the specified item
 
void addItem (const DSRGraphicDataItem &item)
 add item to the list
 
void addOnlyNewItem (const DSRGraphicDataItem &item)
 add item to the list only if it's not already contained
 
OFCondition insertItem (const size_t idx, const DSRGraphicDataItem &item)
 insert item at specified position to the list
 
OFCondition removeItem (const size_t idx)
 remove item from the list
 

Additional Inherited Members

- Static Public Attributes inherited from DSRListOfItems< DSRGraphicDataItem >
static const DSRGraphicDataItem EmptyItem
 default item which is returned in getItem() if the index is invalid.
 
- Protected Member Functions inherited from DSRListOfItems< DSRGraphicDataItem >
OFBool gotoItemPos (size_t idx, OFLIST_TYPENAME OFListConstIterator(DSRGraphicDataItem)&iterator) const
 goto specified item position
 
OFBool gotoItem (const DSRGraphicDataItem &item, OFLIST_TYPENAME OFListConstIterator(DSRGraphicDataItem)&iterator) const
 goto specified item
 
- Protected Attributes inherited from DSRListOfItems< DSRGraphicDataItem >
OFList< DSRGraphicDataItemItemList
 the list maintained by this class
 

Detailed Description

Class for graphic data lists.

Definition at line 108 of file dsrscogr.h.

Constructor & Destructor Documentation

DSRGraphicDataList::DSRGraphicDataList ( const DSRGraphicDataList lst)

copy constructor

Parameters
lstlist to be copied

Member Function Documentation

void DSRGraphicDataList::addItem ( const Float32  column,
const Float32  row 
)

add value pair to the list

Parameters
columncolumn value to be added
rowrow value to be added
const DSRGraphicDataItem& DSRGraphicDataList::getItem ( const size_t  idx) const

get reference to the specified item

Parameters
idxindex of the item to be returned (starting from 1)
Returns
reference to the specified item if successful, EmptyItem otherwise
OFCondition DSRGraphicDataList::getItem ( const size_t  idx,
Float32 &  column,
Float32 &  row 
) const

get copy of the specified value pair

Parameters
idxindex of the value pair to be returned (starting from 1)
columncolumn value of the specified index (set to 0 first)
rowrow value of the specified index (set to 0 first)
Returns
status, EC_Normal if successful, an error code otherwise
DSRGraphicDataList& DSRGraphicDataList::operator= ( const DSRGraphicDataList lst)

assignment operator

Parameters
lstlist to be copied
Returns
reference to this list after 'lst' has been copied
OFCondition DSRGraphicDataList::print ( STD_NAMESPACE ostream &  stream,
const size_t  flags = 0,
const char  pairSeparator = '/',
const char  itemSeparator = ',' 
) const

print list of graphic data.

The output of a typical list looks like this: 0/0,127/127,255/255

Parameters
streamoutput stream to which the list should be printed
flagsflag used to customize the output (see DSRTypes::PF_xxx)
pairSeparatorcharacter specifying the separator between the value pairs
itemSeparatorcharacter specifying the separator between the list items
Returns
status, EC_Normal if successful, an error code otherwise
OFCondition DSRGraphicDataList::putString ( const char *  stringValue)

put list of graphic data as a string.

This function expects the same input format as created by print(), i.e. a comma separated list of numerical value pairs.

Parameters
stringValuestring value to be set
Returns
status, EC_Normal if successful, an error code otherwise
OFCondition DSRGraphicDataList::read ( DcmItem dataset)

read list of graphic data

Parameters
datasetDICOM dataset from which the list should be read
Returns
status, EC_Normal if successful, an error code otherwise
OFCondition DSRGraphicDataList::write ( DcmItem dataset) const

write list of graphic data

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

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


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2