Viewing contents of file '../idllib/astron/contrib/varosi/code/allpro/create_group.pro'
pro create_group, image_List, group

;Frank Varosi STX @ NASA/GSFC 1989.
;F.V. 1991 put selection code into pick_images,
;    and made into function returning group #.

	if N_struct( image_List ) LE 1 then return

	menu = ["Create group of images by..."		,$
		"Selecting individual images"		,$
		"Lasso images with rubber-box"		,$
		"Picking images with common point"	]

	verify = ["MIDDLE button to create this GROUP:"	,$
		  "              RIGHT button to abort" ]

	inums = pick_images( image_List, MENU=menu, VERIFY=verify )

	if (inums(0) LT 0) then return

	group = 1 + max( image_List.group )
	image_List(inums).group = group

	print, FORM="($,A)", " created "
	wg = pop_group( image_List, group, /MARK )

return
end