DCMTK
Version 3.6.7
OFFIS DICOM Toolkit
|
Class managing common information on a context group. More...
Public Member Functions | |
operator const DSRCodedEntryValue & () const | |
conversion operator that returns the currently selected coded entry value (might be empty if none is selected) | |
virtual void | clear () |
clear list of extended coded entries and forget about the currently selected coded entry | |
OFBool | isExtensible () const |
check whether context group is extensible More... | |
void | setExtensible (const OFBool mode=OFTrue) |
change mode specifying whether the context group is extensible or non-extensible More... | |
const OFString & | getIdentifier () const |
get context identifier More... | |
const OFString & | getMappingResource () const |
get mapping resource More... | |
const OFString & | getVersion () const |
get context group version (optional) More... | |
const OFString & | getUID () const |
get context group UID (optional) More... | |
virtual OFBool | hasSelectedValue () const |
check whether a coded entry is selected as the current value More... | |
const DSRCodedEntryValue & | getSelectedValue () const |
get currently selected coded entry value (optional) More... | |
virtual OFCondition | selectValue (const DSRCodedEntryValue &codedEntryValue, const OFBool check=OFTrue, const OFBool definedContextGroup=OFFalse) |
select a given coded entry as the current value More... | |
virtual OFBool | hasCodedEntry (const DSRCodedEntryValue &codedEntryValue) const |
check whether a given coded entry is contained in this context group. More... | |
virtual OFCondition | findCodedEntry (const DSRCodedEntryValue &codedEntryValue) const |
search for a given coded entry in this context group. More... | |
virtual OFBool | hasExtendedCodedEntries () const |
check whether this context group has any extended coded entries. More... | |
virtual OFCondition | addCodedEntry (const DSRCodedEntryValue &codedEntryValue) |
add a coded entry to this context group as an extension, i.e. as a non-standard code. More... | |
virtual OFCondition | lookupCodedEntry (DSRCodedEntryValue &codedEntryValue, const OFBool enhancedEncodingMode=OFFalse) const |
search for a given coded entry in this context group and, if found, replace its value with the one found in the context group. More... | |
virtual void | print (STD_NAMESPACE ostream &stream) const |
print contents of this context group, i.e. a general header, the currently selected coded entry value (if any) and all coded entries that are contained in this context group (both standard and extended ones). More... | |
virtual OFCondition | checkSelectedValue (const OFBool definedContextGroup=OFFalse) const |
check whether the currently selected coded entry is valid. More... | |
Protected Member Functions | |
DSRContextGroup (const OFString &contextIdentifier, const OFString &mappingResource, const OFString &contextGroupVersion="", const OFString &contextGroupUID="", const DSRCodedEntryValue &selectedValue=DSRCodedEntryValue()) | |
constructor More... | |
virtual | ~DSRContextGroup () |
destructor | |
virtual void | printHeader (STD_NAMESPACE ostream &stream) const |
print header with some general information on this context group More... | |
virtual void | printCodes (STD_NAMESPACE ostream &stream) const |
print details on coded entries that are contained in this context group. More... | |
virtual OFCondition | findCodedEntry (const DSRCodedEntryValue &searchForCodedEntry, DSRCodedEntryValue *foundCodedEntry, const OFBool enhancedEncodingMode=OFFalse) const |
search for a given coded entry in this context group More... | |
virtual OFCondition | checkCodedEntry (const DSRCodedEntryValue &codedEntryValue, const OFBool definedContextGroup) const |
check whether a given coded entry is valid. More... | |
Private Types | |
typedef OFList< DSRCodedEntryValue > | CodeList |
type used for storing and managing coded entries | |
Private Attributes | |
const OFString | Identifier |
context identifier (VR=CS, mandatory) | |
const OFString | MappingResource |
mapping resource (VR=CS, mandatory) | |
const OFString | Version |
context group version (VR=DT, optional) | |
const OFString | UID |
context group UID (VR=UI, optional) | |
DSRCodedEntryValue | SelectedValue |
coded entry selected as the current value (optional, might be empty) | |
OFBool | ExtensibleMode |
mode indicating whether context group is extensible (default: false) | |
CodeList | ExtendedCodes |
extended coded entries (e.g. private or implementation-specific ones) | |
Class managing common information on a context group.
This class is used as a base class only.
|
protected |
constructor
contextIdentifier | identifier of the context group |
mappingResource | mapping resource that defines the context group |
contextGroupVersion | version of the context group (optional) |
contextGroupUID | unique identifier of the context group (optional) |
selectedValue | coded entry to be selected as the current value (optional) |
|
virtual |
add a coded entry to this context group as an extension, i.e. as a non-standard code.
Adding a new coded entry by this method only works for extensible context groups. Please note that the 'codedEntryValue' is not checked for validity.
codedEntryValue | coded entry to be added to this context group |
|
protectedvirtual |
check whether a given coded entry is valid.
Internally, the method hasCodedEntry() is used if 'definedContextGroup' is OFTrue.
codedEntryValue | coded entry to be checked |
definedContextGroup | flag indicating whether this context group is used as a baseline (default) or defined context group. The first means that the list of coded entries in this context group is just a suggestion. The latter means that one of the coded entries should be used. |
|
virtual |
check whether the currently selected coded entry is valid.
Internally, the method hasCodedEntry() is used if 'definedContextGroup' is OFTrue.
definedContextGroup | flag indicating whether this context group is used as a baseline (default) or defined context group. The first means that the list of coded entries in this context group is just a suggestion. The latter means that one of the coded entries should be used. |
|
virtual |
search for a given coded entry in this context group.
If found, the type of the entry (standard or extension) is returned:
codedEntryValue | coded entry to be searched for |
|
protectedvirtual |
search for a given coded entry in this context group
searchForCodedEntry | coded entry to be searched for |
foundCodedEntry | pointer to variable that will store the coded entry (if found and pointer is not NULL) |
enhancedEncodingMode | set enhanced encoding mode for coded entry (not used for this class, only in derived classes) |
Reimplemented in CID7469_GenericIntensityAndSizeMeasurements, CID7464_GeneralRegionOfInterestMeasurementModifiers, CID7453_PerformingRoles, CID7452_OrganizationalRoles, CID7445_DeviceParticipatingRoles, CID7181_AbstractMultiDimensionalImageModelComponentUnits, CID7021_MeasurementReportDocumentTitles, CID6147_ResponseCriteria, CID5001_Countries, CID5000_Languages, CID42_NumericValueQualifier, CID4031_CommonAnatomicRegions, CID4021_PETRadiopharmaceutical, CID4020_PETRadionuclide, CID29_AcquisitionModality, CID247_LateralityLeftRightOnly, CID244_Laterality, CID11_RouteOfAdministration, CID10033_CTReconstructionAlgorithm, CID10013_CTAcquisitionType, and CID100_QuantitativeDiagnosticImagingProcedures.
|
inline |
get context identifier
|
inline |
get mapping resource
|
inline |
get currently selected coded entry value (optional)
|
inline |
get context group UID (optional)
|
inline |
get context group version (optional)
|
virtual |
check whether a given coded entry is contained in this context group.
Internally, the method findCodedEntry() is used for this purpose.
codedEntryValue | coded entry to be checked |
|
virtual |
check whether this context group has any extended coded entries.
Extended coded entries are those non-standard codes added by addCodedEntry().
|
virtual |
check whether a coded entry is selected as the current value
|
inline |
check whether context group is extensible
|
virtual |
search for a given coded entry in this context group and, if found, replace its value with the one found in the context group.
This method can, therefore, be used to lookup the "official" code meaning or to set the "enhanced encoding mode".
codedEntryValue | coded entry to be searched for. Should be a valid code, i.e. at least the three mandatory components have to be non-empty. Also used to store the retrieved coded entry. |
enhancedEncodingMode | set enhanced encoding mode for coded entry (if enabled) |
|
virtual |
print contents of this context group, i.e. a general header, the currently selected coded entry value (if any) and all coded entries that are contained in this context group (both standard and extended ones).
See DSRCodedEntryValue::print() for details of the coded entry output.
stream | stream to which the output should be printed |
|
protectedvirtual |
print details on coded entries that are contained in this context group.
See DSRCodedEntryValue::print() for details of the coded entry output.
stream | stream to which the output should be printed |
Reimplemented in CID7469_GenericIntensityAndSizeMeasurements, CID7464_GeneralRegionOfInterestMeasurementModifiers, CID7453_PerformingRoles, CID7452_OrganizationalRoles, CID7445_DeviceParticipatingRoles, CID7181_AbstractMultiDimensionalImageModelComponentUnits, CID7021_MeasurementReportDocumentTitles, CID6147_ResponseCriteria, CID5001_Countries, CID5000_Languages, CID42_NumericValueQualifier, CID4031_CommonAnatomicRegions, CID4021_PETRadiopharmaceutical, CID4020_PETRadionuclide, CID29_AcquisitionModality, CID247_LateralityLeftRightOnly, CID244_Laterality, CID11_RouteOfAdministration, CID10033_CTReconstructionAlgorithm, CID10013_CTAcquisitionType, and CID100_QuantitativeDiagnosticImagingProcedures.
|
protectedvirtual |
print header with some general information on this context group
stream | stream to which the output should be printed |
|
virtual |
select a given coded entry as the current value
codedEntryValue | coded entry to be selected as the current value |
check | if enabled, check 'codedEntryValue' for validity and appropriateness before selecting it as the current value. See checkSelectedValue() for details. |
definedContextGroup | flag indicating whether this context group is used as a baseline (default) or defined context group. The first means that the list of coded entries in this context group is just a suggestion. The latter means that one of the coded entries should be used. |
|
inline |
change mode specifying whether the context group is extensible or non-extensible
mode | set context group type to extensible if OFTrue (default) |