%N boxruns %F $MIR/src/subs/boxes.for
%D Return region of interest in "runs" form.
%P mjs
%: region-of-interest
%B
      subroutine BoxRuns(naxis,plane,flags,boxes,
     *                runs,maxruns,nruns,xminv,xmaxv,yminv,ymaxv)

      character flags*(*)
      integer naxis,plane(naxis)
      integer boxes(*),maxruns,nruns,runs(3,maxruns)
      integer xminv,xmaxv,yminv,ymaxv
  ---------------------------------------------------------------------
  This returns the caller a runs specification for the particular plane
  that the user is currently interested in.

  Input:
    naxis      The dimension of "plane".
    plane      The index, along the third, fourth, etc dimension of the
               cube to be accessed.
    flags      A string. Each character indicates an extra step to
               perform.  Currently there is only one possibility:
                 'r' Make runs specification relative to xminv,yminv.
    boxes      Some intermediate form of the boxes specified by the
               user.
    maxruns    Max number of runs that this program can cope with.

  Output:
    runs       Runs specifications.
    nruns      Number of runs.
    xminv,yminv)       Minimum regions containing the area selected.
    xmaxv,ymaxv)
