aboutsummaryrefslogtreecommitdiff
path: root/sys/pmio/pmnewmask.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/pmio/pmnewmask.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/pmio/pmnewmask.x')
-rw-r--r--sys/pmio/pmnewmask.x28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/pmio/pmnewmask.x b/sys/pmio/pmnewmask.x
new file mode 100644
index 00000000..200e4841
--- /dev/null
+++ b/sys/pmio/pmnewmask.x
@@ -0,0 +1,28 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <pmset.h>
+include <imhdr.h>
+include <imio.h>
+include <plio.h>
+
+# PM_NEWMASK -- Create an empty mask with the same dimensionality and size as
+# the given reference image.
+
+pointer procedure pm_newmask (ref_im, depth)
+
+pointer ref_im #I reference image
+int depth #I mask depth, bits
+
+pointer pl
+pointer pl_open()
+errchk pl_open
+
+begin
+ pl = pl_open (NULL)
+ call pl_ssize (pl, IM_NDIM(ref_im), IM_SVLEN(ref_im,1), depth)
+
+ PM_REFIM(pl) = ref_im
+ PM_MAPXY(pl) = IM_SECTUSED(ref_im)
+
+ return (pl)
+end