% @(#)apply_conv.hlq	19.1 (ESO-IPG) 02/25/03 14:02:56 
%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
%.COPYRIGHT  (c)  1990 European Southern Observatory
%.IDENT      apply_conv.hlq
%.AUTHOR     KB, IPG/ESO
%.KEYWORDS   MIDAS, help files, APPLY/CONVERSION
%.PURPOSE    On-line help file for the command: APPLY/CONVERSION
%.VERSION    1.0  08-JAN-1990 : Creation, KB
%----------------------------------------------------------------
\se
SECTION./CONV
\es\co
APPLY/CONVERSION				08-JAN-1990  KB
\oc\su
APPLY/CONVERSION IMTB ima tab threshold
	convert a "mask" image to a table 
\\
APPLY/CONVERSION TBIM tab ima npx1,npx2 sta1,sta2,stp1,stp2 bg,fg
	convert a table to a "mask" image
\us\pu
Purpose:      
         Convert a "mask" image to a table, or convert a table to a 
         "mask" image.
\up\sub
Subject:      
         Masks, tables defining regions of interest
\bus\sy
Syntax:       
         a) APPLY/CONV IMTB ima tab threshold
\\
         b) APPLY/CONV TBIM tab ima npx1,npx2 sta1,sta2,stp1,stp2 bg,fg
\ys\pa
         fromto_flag = IMTB for image to table (a),
             or TBIM for table to image (b);
\\
             defaulted to IMTB
\ap\pa
         (a) ima = input frame defining a "mask" where regions of
                 interest are specified by a pixel value above the threshold
\ap\pa
         (a) tab = output table, columns :XSTART, :YSTART, :XEND and
                 :YEND hold the world coords. of the regions of interest
\ap\pa
         (a) threshold = threshold value for regions of interest;
\\
                 defaulted to 1.0
\\
\ap\pa
         (b) tab = input table, columns :XSTART, :YSTART, :XEND and
                 :YEND hold the world coords. of the regions of interest
\ap\pa
         (b) ima = output frame defining a "mask" where regions of interest
                 have foreground pixel value, the rest has background pixel
                 value
\ap\pa
         (b) npx1,npx2 = no. of pixels in x,y dimension for output image;
\\
                 defaulted to 200,200
\ap\pa
         (b) sta1,sta2,stp1,stp2 = \\ start and step values in x,y;
\\
                 defaulted to 0.0,0.0,1.0,1.0
\ap\pa
         (b) bg,fg = background, foreground values to define regions;
\\
                 defaulted to 0.0,1.0
\ap\no
Note:    Currently the regions of interest cannot overlap if you convert from
         a "mask" image to a table.
\\
         The main use of these commands is to prepare a table for all the
         commands which accept regions of interest specified in a table, like
         e.g. MODIFY/PIXEL.
\on\sa
See also:     
         MODIFY, STATISTICS commands
\as\exs
Examples:
\ex
         APPLY/CONV IMTB masky roi 63.45
           Store the start, end (world) coordinates of all regions in the
           frame `masky.bdf' with a pixel value > or = 63.45 in the columns
           labeled :XSTART, :YSTART, :XEND, :YEND of the new table `roi.tbl'.
\xe\ex
         APPLY/CONV TBIM coords quetzal 400,400 ? 16.6,33.3
           Create the 400*400 frame `quetzal.bdf' (start 0.0,0.0 and step sizes
           1.0,1.0). All regions specified in table `coords.tbl' get pixel
           value 33.3, the rest of the image is set to 16.6 .
\xe \sxe
