DCMTK
Version 3.6.7
OFFIS DICOM Toolkit
|
Class managing common information on an SR template. More...
Public Member Functions | |
virtual void | clear () |
clear non-static member variables | |
virtual OFBool | hasTemplateIdentification () const |
check whether template identification is set More... | |
virtual OFBool | isTemplateIdentificationValid (const OFBool check=OFTrue) const |
check whether template identification is valid More... | |
virtual OFBool | isExtensible () const |
check whether template is extensible More... | |
virtual OFBool | isOrderSignificant () const |
check whether the order of content items in this template is significant More... | |
virtual OFBool | compareTemplateIdentication (const OFString &templateIdentifier, const OFString &mappingResource, const OFString &mappingResourceUID="") const |
compare template identification with given values More... | |
const OFString & | getTemplateIdentifier () const |
get template identifier More... | |
const OFString & | getMappingResource () const |
get mapping resource More... | |
const OFString & | getMappingResourceUID () const |
get optional mapping resource UID More... | |
virtual void | setExtensible (const OFBool mode=OFTrue) |
change mode specifying whether the template is extensible or non-extensible More... | |
virtual void | setOrderSignificant (const OFBool mode=OFTrue) |
change mode specifying whether the order of content items in this template is significant or non-significant More... | |
Protected Member Functions | |
DSRTemplateCommon (const OFString &templateIdentifier, const OFString &mappingResource, const OFString &mappingResourceUID="") | |
constructor More... | |
virtual | ~DSRTemplateCommon () |
destructor | |
void | clearEntriesInNodeList () |
clear all entries in the list of node IDs, i.e. set them to their initial value, which is 0 | |
void | reserveEntriesInNodeList (const size_t count, const OFBool initialize=OFFalse) |
reserve a certain number of entries in the list of node IDs. More... | |
void | storeEntryInNodeList (const size_t pos, const size_t nodeID) |
store given entry at a certain position in the list of node IDs More... | |
size_t | getEntryFromNodeList (const size_t pos) const |
get a particular entry from the list of node IDs More... | |
size_t | gotoEntryFromNodeList (DSRDocumentTreeNodeCursor &cursor, const size_t pos) const |
set given cursor to a specific node More... | |
size_t | gotoEntryFromNodeList (DSRDocumentSubTree *tree, const size_t pos) |
set internal cursor of a given document tree to a specific node More... | |
size_t | gotoLastEntryFromNodeList (DSRDocumentSubTree *tree, const size_t lastPos, const size_t firstPos=0) |
set internal cursor of a given document tree to a particular node. More... | |
Private Attributes | |
const OFString | TemplateIdentifier |
template identifier (VR=CS, mandatory) | |
const OFString | MappingResource |
mapping resource (VR=CS, mandatory) | |
const OFString | MappingResourceUID |
mapping resource UID (VR=UI, optional) | |
OFBool | ExtensibleMode |
mode indicating whether template is extensible (default: false) | |
OFBool | OrderSignificantMode |
mode indicating whether the order of content items in this template is significant (default: false) | |
OFVector< size_t > | NodeList |
list of node IDs used to remember certain positions in the template | |
Class managing common information on an SR template.
This class is used as a base class only.
|
protected |
constructor
templateIdentifier | identifier of the template |
mappingResource | mapping resource that defines the template |
mappingResourceUID | uniquely identifies the mapping resource (optional) |
|
virtual |
compare template identification with given values
templateIdentifier | template identifier to compare with |
mappingResource | mapping resource that defines the template |
mappingResourceUID | uniquely identifies the mapping resource (optional). Not used for comparison if the value is empty. |
|
protected |
get a particular entry from the list of node IDs
pos | index of the list entry to retrieve (starting from 0) |
|
inline |
get mapping resource
|
inline |
get optional mapping resource UID
|
inline |
get template identifier
|
protected |
set internal cursor of a given document tree to a specific node
tree | pointer to document tree where nodes and cursor are stored |
pos | index of the list entry that stores the ID of the node |
|
protected |
set given cursor to a specific node
cursor | reference to document tree node cursor that is used to start searching the node from and that is set afterwards |
pos | index of the list entry that stores the ID of the node |
|
protected |
set internal cursor of a given document tree to a particular node.
The node is determined from the list of node IDs, starting from the entry specified by the parameter 'lastPos'. The reverse search stops if either an entry with a non-zero value (valid node ID) is found or the first list entry is reached. This approach in particular supports handling of template tables where the order of content items is significant.
tree | pointer to document tree where nodes and cursor are stored |
lastPos | index of the last node list entry to start searching from |
firstPos | optional index of the node list entry to stop searching |
|
virtual |
check whether template identification is set
|
inlinevirtual |
check whether template is extensible
|
inlinevirtual |
check whether the order of content items in this template is significant
|
virtual |
check whether template identification is valid
check | check internally stored values for conformance with VR and VM if enabled |
|
protected |
reserve a certain number of entries in the list of node IDs.
Using this method can help to avoid unwanted memory allocations and copying of list entries.
count | number of entries to be reserved (for later use) |
initialize | initialize all entries with a value of 0 if OFTrue, just reserve but do not create them otherwise (default) |
|
inlinevirtual |
change mode specifying whether the template is extensible or non-extensible
mode | set template type to extensible if OFTrue (default) |
|
inlinevirtual |
change mode specifying whether the order of content items in this template is significant or non-significant
mode | set order of content items to significant if OFTrue (default) |
|
protected |
store given entry at a certain position in the list of node IDs
pos | index of the list entry to use for storage (starting from 0) |
nodeID | ID of the node that should be stored at the given position |