diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/pmio/pmempty.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/pmio/pmempty.x')
-rw-r--r-- | sys/pmio/pmempty.x | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/pmio/pmempty.x b/sys/pmio/pmempty.x new file mode 100644 index 00000000..c8797663 --- /dev/null +++ b/sys/pmio/pmempty.x @@ -0,0 +1,27 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <imhdr.h> +include <pmset.h> +include <plio.h> + +# PM_EMPTY -- Test whether a mask is empty, i.e., contains no nonzero pixels. + +bool procedure pm_empty (pl) + +pointer pl #I mask descriptor + +bool pl_empty(), pl_sectnotempty() +include "pmio.com" + +begin + if (PM_MAPXY(pl) == YES) { + call amovkl (1, v1, PM_MAXDIM) + call imaplv (PM_REFIM(pl), v1, v2, PM_MAXDIM) + call amovl (IM_LEN(PM_REFIM(pl),1), v3, PM_MAXDIM) + call imaplv (PM_REFIM(pl), v3, v4, PM_MAXDIM) + + return (!pl_sectnotempty (pl, v2, v4, PM_MAXDIM)) + + } else + return (pl_empty (pl)) +end |