IDLffDICOM::GetGroup

The IDLffDICOM::GetGroup function method takes optional DICOM group and/or element arguments and returns an array of DICOM Group numbers for those parameters.

Syntax

Result = Obj->[IDLffDICOM::]GetGroup([Group[, Element]] [, REFERENCE=list of element references])

Return Value

Returns an array of integers representing the DICOM Group numbers for Group parameters. If no arguments or keywords are specified, the returned array contains Group numbers for all groups in the object. The effect of multiple keywords and parameters is to AND their results. If no matching elements can be found, the function returns -1.

Arguments

Group

An optional argument representing the value for the DICOM group for which to search, such as ‘0018’x. If this argument is omitted, then all of the DICOM array elements are returned.

Element

An optional argument specified only if the Group argument has also been specified. Set this to the value for the DICOM element for which to search, such as ‘0010’x. If this argument is omitted and the Group argument was specified, then all elements of the specified Group are returned.

Keywords

REFERENCE

Set this keyword to a list of element references from which to return group number values.

Examples

obj = OBJ_NEW('IDLffDICOM')

read = obj->Read(DIALOG_PICKFILE(FILTER='*'))

 

; Get references to all elements with "patient" in the description:

refs = obj->GetReference(DESCRIPTION='patient')

 

; Get the group numbers of the elements containing "patient":

FOR i = 0, N_ELEMENTS(refs)-1 DO BEGIN

   num = obj->GetGroup(REFERENCE=refs[i])

   PRINT, num

ENDFOR

 

; Get the group numbers from the Patient Info group, 0010:

grp = obj->GetGroup('0010'x)

PRINT, grp

 

OBJ_DESTROY,obj

Version History

5.2

Introduced