QMed_GetElementDataAsLong(imageRef; elementRef; itemIndex; elementData):error
imageRef Longint Reference to the image
elementRef Longint Element reference
itemIndex Longint Item index
elementData Longint Element data
error Longint Error result

Returns the content of a data element item as a longint.

The DICOM image file is specified by imageRef. If imageRef is not a valid image reference, error qmed_paramErr is returned. If imageRef is a valid image reference but the image is not in the DICOM format, error qmed_badComponentType is returned.

Parameter elementRef specifies the data element. The element reference must have been previously obtained with a call to QMed_GetElements or QMed_FindElement. If elementRef is not a valid element reference, error qmed_badDataElementRef is returned.

Parameter itemIndex specifies the item index whose data is to be returned. The item index must be greater than 0 and less than or equal to the number of items (multiplicity) of the data element, otherwise error qmed_badElementItemIndex is returned.

Parameter elementData receives the element data casted to a longint. If the element is empty (data size is 0), error qmed_noElementDataErr is returned.

The data element types (value representations) supported by this command are listed in the following table. All other types trigger a qmed_badElementTypeErr error.

qmed_UnsignedShortVR 25 Unsigned short (2 bytes fixed)
qmed_SignedShortVR 19 Signed short (2 bytes fixed)
qmed_SignedLongVR 17 Signed long (4 bytes fixed)
qmed_UnsignedLongVR 23 Unsigned long (4 bytes fixed)
qmed_FloatingPointSingleVR 8 Single precision floating point (4 bytes fixed)
qmed_FloatingPointDoubleVR 9 Double precision floating point (8 bytes fixed)
qmed_IntegerStringVR 10 Integer string (12 bytes max)
qmed_DecimalStringVR 6 Decimal string (16 bytes max)

QMedical © Escape
Generated by QDoc 2.8 on Wed, Jan 27, 2010 17:55:29