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/plio/plempty.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/plio/plempty.x')
-rw-r--r-- | sys/plio/plempty.x | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/plio/plempty.x b/sys/plio/plempty.x new file mode 100644 index 00000000..2dab29ed --- /dev/null +++ b/sys/plio/plempty.x @@ -0,0 +1,25 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <plio.h> + +# PL_EMPTY -- Test whether a mask is empty, i.e., contains no nonzero pixels. + +bool procedure pl_empty (pl) + +pointer pl #I mask descriptor +int i + +begin + # Mask is empty if all lines are empty. + do i = 1, PL_NLP(pl) + if (PL_LP(pl,i) != PL_EMPTYLINE) + return (false) + + return (true) + + # The following also works, but the call to pl_compress is an + # unintended side effect which it is best to avoid. + + # call pl_compress (pl) + # return (PL_LLOP(pl) == LP_BLEN(Ref(pl,0))) +end |