Inheritance diagram for DSRNumericMeasurementValue:
Public Member Functions | |
DSRNumericMeasurementValue () | |
default constructor | |
DSRNumericMeasurementValue (const OFString &numericValue, const DSRCodedEntryValue &measurementUnit) | |
constructor. | |
DSRNumericMeasurementValue (const OFString &numericValue, const DSRCodedEntryValue &measurementUnit, const DSRCodedEntryValue &valueQualifier) | |
constructor. | |
DSRNumericMeasurementValue (const DSRNumericMeasurementValue &numericMeasurement) | |
copy constructor | |
virtual | ~DSRNumericMeasurementValue () |
destructor | |
DSRNumericMeasurementValue & | operator= (const DSRNumericMeasurementValue &numericMeasurement) |
assignment operator | |
virtual void | clear () |
clear all internal variables. | |
virtual OFBool | isValid () const |
check whether the current numeric measurement value is valid. | |
virtual OFBool | isEmpty () const |
check whether the current numeric measurement value is empty. | |
virtual OFCondition | print (STD_NAMESPACE ostream &stream, const size_t flags) const |
print numeric measurement value. | |
virtual OFCondition | readXML (const DSRXMLDocument &doc, DSRXMLCursor cursor) |
read numeric measurement value from XML document | |
virtual OFCondition | writeXML (STD_NAMESPACE ostream &stream, const size_t flags) const |
write numeric measurement value in XML format | |
virtual OFCondition | readSequence (DcmItem &dataset) |
read measured value sequence and numeric value qualifier code sequence from dataset. | |
virtual OFCondition | writeSequence (DcmItem &dataset) const |
write measured value sequence and numeric value qualifier code sequence to dataset. | |
virtual OFCondition | renderHTML (STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &annexStream, size_t &annexNumber, const size_t flags) const |
render numeric measurement value in HTML/XHTML format | |
const DSRNumericMeasurementValue & | getValue () const |
get reference to numeric measurement value | |
OFCondition | getValue (DSRNumericMeasurementValue &numericMeasurement) const |
get copy of numeric measurement value | |
const OFString & | getNumericValue () const |
get numeric value | |
const DSRCodedEntryValue & | getMeasurementUnit () const |
get measurement unit | |
const DSRCodedEntryValue & | getNumericValueQualifier () const |
get numeric value qualifier (optional) | |
OFCondition | getMeasurementUnit (DSRCodedEntryValue &measurementUnit) const |
get copy of measurement unit | |
OFCondition | setValue (const DSRNumericMeasurementValue &numericMeasurement) |
set numeric measurement value. | |
OFCondition | setValue (const OFString &numericValue, const DSRCodedEntryValue &measurementUnit) |
set numeric value and measurement unit. | |
OFCondition | setValue (const OFString &numericValue, const DSRCodedEntryValue &measurementUnit, const DSRCodedEntryValue &valueQualifier) |
set numeric value, measurement unit and numeric value qualifier. | |
OFCondition | setNumericValue (const OFString &numericValue) |
set numeric value. | |
OFCondition | setMeasurementUnit (const DSRCodedEntryValue &measurementUnit) |
set measurement unit. | |
OFCondition | setNumericValueQualifier (const DSRCodedEntryValue &valueQualifier) |
set numeric value qualifier. | |
Protected Member Functions | |
DSRNumericMeasurementValue * | getValuePtr () |
get pointer to numeric measurement value | |
virtual OFCondition | readItem (DcmItem &dataset) |
read numeric measurement value from dataset | |
virtual OFCondition | writeItem (DcmItem &dataset) const |
write numeric measurement value to dataset | |
virtual OFBool | checkNumericValue (const OFString &numericValue) const |
check the specified numeric value for validity. | |
virtual OFBool | checkMeasurementUnit (const DSRCodedEntryValue &measurementUnit) const |
check the specified measurement unit for validity. | |
virtual OFBool | checkNumericValueQualifier (const DSRCodedEntryValue &valueQualifier) const |
check the specified numeric value qualifier for validity. | |
Private Attributes | |
OFString | NumericValue |
numeric value (VR=DS, type 1) | |
DSRCodedEntryValue | MeasurementUnit |
measurement unit (type 2) | |
DSRCodedEntryValue | ValueQualifier |
numeric value qualifier (type 3) | |
Friends | |
class | DSRContentItem |
Definition at line 47 of file dsrnumvl.h.
DSRNumericMeasurementValue::DSRNumericMeasurementValue | ( | const OFString & | numericValue, | |
const DSRCodedEntryValue & | measurementUnit | |||
) |
constructor.
The code triple is only set if it passed the validity check (see setValue()).
numericValue | numeric measurement value. (VR=DS, type 1) | |
measurementUnit | code representing the measurement name (code meaning) and unit (code value). (type 2) |
DSRNumericMeasurementValue::DSRNumericMeasurementValue | ( | const OFString & | numericValue, | |
const DSRCodedEntryValue & | measurementUnit, | |||
const DSRCodedEntryValue & | valueQualifier | |||
) |
constructor.
The two codes are only set if they passed the validity check (see setValue()).
numericValue | numeric measurement value. (VR=DS, type 1) | |
measurementUnit | code representing the measurement name (code meaning) and unit (code value). (type 2) | |
valueQualifier | code representing the numeric value qualifier. (type 3) |
DSRNumericMeasurementValue::DSRNumericMeasurementValue | ( | const DSRNumericMeasurementValue & | numericMeasurement | ) |
copy constructor
numericMeasurement | numeric measurement value to be copied (not checked !) |
DSRNumericMeasurementValue& DSRNumericMeasurementValue::operator= | ( | const DSRNumericMeasurementValue & | numericMeasurement | ) |
assignment operator
numericMeasurement | numeric measurement value to be copied (not checked !) |
virtual void DSRNumericMeasurementValue::clear | ( | ) | [virtual] |
clear all internal variables.
Use this method to create an empty numeric measurement value.
Reimplemented in DSRNumTreeNode.
virtual OFBool DSRNumericMeasurementValue::isValid | ( | ) | const [virtual] |
check whether the current numeric measurement value is valid.
The value is valid if isEmpty() is true or all three values (numeric value, measurement unit and value qualifier) do contain valid values (see checkXXX() methods).
Reimplemented in DSRNumTreeNode.
virtual OFBool DSRNumericMeasurementValue::isEmpty | ( | ) | const [virtual] |
check whether the current numeric measurement value is empty.
Checks whether both the numeric value and the measurement unit are empty.
virtual OFCondition DSRNumericMeasurementValue::print | ( | STD_NAMESPACE ostream & | stream, | |
const size_t | flags | |||
) | const [virtual] |
print numeric measurement value.
The output of a typical numeric measurement value looks like this: "3" (cm,99_OFFIS_DCMTK,"Length Unit"). If the value is empty the text "empty" is printed instead. The numeric value qualifier is never printed.
stream | output stream to which the numeric measurement value should be printed | |
flags | flag used to customize the output (not used) |
Reimplemented in DSRNumTreeNode.
virtual OFCondition DSRNumericMeasurementValue::readXML | ( | const DSRXMLDocument & | doc, | |
DSRXMLCursor | cursor | |||
) | [virtual] |
read numeric measurement value from XML document
doc | document containing the XML file content | |
cursor | cursor pointing to the starting node |
virtual OFCondition DSRNumericMeasurementValue::writeXML | ( | STD_NAMESPACE ostream & | stream, | |
const size_t | flags | |||
) | const [virtual] |
write numeric measurement value in XML format
stream | output stream to which the XML document is written | |
flags | flag used to customize the output (see DSRTypes::XF_xxx) |
Reimplemented in DSRNumTreeNode.
virtual OFCondition DSRNumericMeasurementValue::readSequence | ( | DcmItem & | dataset | ) | [virtual] |
read measured value sequence and numeric value qualifier code sequence from dataset.
The number of items within the sequences is checked. If error/warning output are enabled a warning message is printed if a sequence is absent or contains more than one item.
dataset | DICOM dataset from which the sequences should be read |
virtual OFCondition DSRNumericMeasurementValue::writeSequence | ( | DcmItem & | dataset | ) | const [virtual] |
write measured value sequence and numeric value qualifier code sequence to dataset.
The measured value sequence is always written (might be empty, though). The numeric value qualifier code sequence is optional and, therefore, only written if non-empty.
dataset | DICOM dataset to which the sequences should be written |
virtual OFCondition DSRNumericMeasurementValue::renderHTML | ( | STD_NAMESPACE ostream & | docStream, | |
STD_NAMESPACE ostream & | annexStream, | |||
size_t & | annexNumber, | |||
const size_t | flags | |||
) | const [virtual] |
render numeric measurement value in HTML/XHTML format
docStream | output stream to which the main HTML/XHTML document is written | |
annexStream | output stream to which the HTML/XHTML document annex is written | |
annexNumber | reference to the variable where the current annex number is stored. Value is increased automatically by 1 after a new entry has been added. | |
flags | flag used to customize the output (see DSRTypes::HF_xxx) |
const DSRNumericMeasurementValue& DSRNumericMeasurementValue::getValue | ( | ) | const [inline] |
get reference to numeric measurement value
Definition at line 171 of file dsrnumvl.h.
OFCondition DSRNumericMeasurementValue::getValue | ( | DSRNumericMeasurementValue & | numericMeasurement | ) | const |
get copy of numeric measurement value
numericMeasurement | reference to variable in which the value should be stored |
const OFString& DSRNumericMeasurementValue::getNumericValue | ( | ) | const [inline] |
get numeric value
Definition at line 185 of file dsrnumvl.h.
References NumericValue.
const DSRCodedEntryValue& DSRNumericMeasurementValue::getMeasurementUnit | ( | ) | const [inline] |
get measurement unit
Definition at line 193 of file dsrnumvl.h.
References MeasurementUnit.
const DSRCodedEntryValue& DSRNumericMeasurementValue::getNumericValueQualifier | ( | ) | const [inline] |
get numeric value qualifier (optional)
Definition at line 201 of file dsrnumvl.h.
References ValueQualifier.
OFCondition DSRNumericMeasurementValue::getMeasurementUnit | ( | DSRCodedEntryValue & | measurementUnit | ) | const |
get copy of measurement unit
measurementUnit | reference to variable in which the code should be stored |
OFCondition DSRNumericMeasurementValue::setValue | ( | const DSRNumericMeasurementValue & | numericMeasurement | ) |
set numeric measurement value.
Before setting the value it is checked (see checkXXX()). If the value is invalid the current value is not replaced and remains unchanged.
numericMeasurement | value to be set |
OFCondition DSRNumericMeasurementValue::setValue | ( | const OFString & | numericValue, | |
const DSRCodedEntryValue & | measurementUnit | |||
) |
set numeric value and measurement unit.
Before setting the values they are checked (see checkXXX()). If the value pair is invalid the current value pair is not replaced and remains unchanged.
numericValue | numeric value to be set | |
measurementUnit | measurement unit to be set |
OFCondition DSRNumericMeasurementValue::setValue | ( | const OFString & | numericValue, | |
const DSRCodedEntryValue & | measurementUnit, | |||
const DSRCodedEntryValue & | valueQualifier | |||
) |
set numeric value, measurement unit and numeric value qualifier.
Before setting the values they are checked (see checkXXX()). If one of the three values is invalid the current numeric measurement value is not replaced and remains unchanged.
numericValue | numeric value to be set | |
measurementUnit | measurement unit to be set | |
valueQualifier | numeric value qualifier to be set |
OFCondition DSRNumericMeasurementValue::setNumericValue | ( | const OFString & | numericValue | ) |
set numeric value.
Before setting the value it is checked (see checkNumericValue()). If the value is invalid the current value is not replaced and remains unchanged.
numericValue | numeric value to be set (VR=DS) |
OFCondition DSRNumericMeasurementValue::setMeasurementUnit | ( | const DSRCodedEntryValue & | measurementUnit | ) |
set measurement unit.
Before setting the code it is checked (see checkMeasurementUnit()). If the code is invalid the current code is not replaced and remains unchanged.
measurementUnit | measurement unit to be set |
OFCondition DSRNumericMeasurementValue::setNumericValueQualifier | ( | const DSRCodedEntryValue & | valueQualifier | ) |
set numeric value qualifier.
This optional code specifies the qualification of the Numeric Value in the Measured Value Sequence, or the reason for the absence of the Measured Value Sequence Item. Before setting the code it is checked (see checkNumericValueQualifier()). If the code is invalid the current code is not replaced and remains unchanged.
valueQualifier | numeric value qualifier to be set |
DSRNumericMeasurementValue* DSRNumericMeasurementValue::getValuePtr | ( | ) | [inline, protected] |
get pointer to numeric measurement value
Definition at line 275 of file dsrnumvl.h.
virtual OFCondition DSRNumericMeasurementValue::readItem | ( | DcmItem & | dataset | ) | [protected, virtual] |
read numeric measurement value from dataset
dataset | DICOM dataset from which the value should be read |
virtual OFCondition DSRNumericMeasurementValue::writeItem | ( | DcmItem & | dataset | ) | const [protected, virtual] |
write numeric measurement value to dataset
dataset | DICOM dataset to which the value should be written |
virtual OFBool DSRNumericMeasurementValue::checkNumericValue | ( | const OFString & | numericValue | ) | const [protected, virtual] |
check the specified numeric value for validity.
Currently the only check that is performed is that the string is not empty. Later on it might be checked whether the format conforms to the definition of DS.
numericValue | numeric value to be checked |
virtual OFBool DSRNumericMeasurementValue::checkMeasurementUnit | ( | const DSRCodedEntryValue & | measurementUnit | ) | const [protected, virtual] |
check the specified measurement unit for validity.
The isValid() method in class DSRCodedEntryValue is used for this purpose.
measurementUnit | measurement unit to be checked |
virtual OFBool DSRNumericMeasurementValue::checkNumericValueQualifier | ( | const DSRCodedEntryValue & | valueQualifier | ) | const [protected, virtual] |
check the specified numeric value qualifier for validity.
The isEmpty() and isValid() methods in class DSRCodedEntryValue are used for this purpose. The conformance with the Context Group 42 (as defined in the DICOM standard) is not yet checked.
valueQualifier | numeric value qualifier to be checked |