 
;...............................................................................
Pro DCURSOR, ima, tab_name, n_points
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; NAME:
;       DCURSOR.PRO
; PURPOSE:
;       put the pixels coordinates & the pixels values selected with the
;       cursor in a table that can be readed.
; CATEGORY:
;       array manipulation
; CALLING SEQUENCE:
;       DCURSOR, ima, tab_name, n_points
; INPUTS:
;       ima                         image array (in memory)
;       tab_name                    name of table that receives the values
;       n_points                    number of points in the table
; KEYWORD PARAMETERS:
;                                   None
; OUTPUTS:
;       values writted in the table
; COMMON BLOCKS:
;       None.
; SIDE EFFECTS:
;       None
; RESTRICTIONS:
;
; PROCEDURE:
;       Straightforward.
; MODIFICATION HISTORY:
;       Written by M.B  v.1.0       : LAS  01/27/94
;-------------------------------------------------------------------------------
tab_name = make_array(4,n_points)
print,'table :'
box_cursor,x1,y1,1,1,/fixed
i=0
;
repeat begin
box_cursor,x1,y1,1,1,/init,/fixed
xsave = x1
ysave = y1
tab_name(0,i)=i+1
tab_name(1,i)=xsave
tab_name(2,i)=ysave
tab_name(3,i)=ima(xsave,ysave)
print,'point #',i+1,'x :',xsave,'y :',ysave,'value :',ima(xsave,ysave)
xyouts,xsave,ysave,'+',/device,/noclip,charsize=1.,alignment=0.5,color=255
i=i+1
endrep until (x1 eq xsave) and (y1 eq ysave) and (i+1 eq n_points+1)
;
return
end
;...............................................................................


