From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/imio/tf/imgnlr.x | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 sys/imio/tf/imgnlr.x (limited to 'sys/imio/tf/imgnlr.x') diff --git a/sys/imio/tf/imgnlr.x b/sys/imio/tf/imgnlr.x new file mode 100644 index 00000000..b14c96bb --- /dev/null +++ b/sys/imio/tf/imgnlr.x @@ -0,0 +1,29 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include + +# IMGNL -- Get the next line from an image of any dimension or datatype. +# This is a sequential operator. The index vector V should be initialized +# to the first line to be read before the first call. Each call increments +# the leftmost subscript by one, until V equals IM_LEN, at which time EOF +# is returned. + +int procedure imgnlr (imdes, lineptr, v) + +pointer imdes +pointer lineptr # on output, points to the pixels +long v[IM_MAXDIM] # loop counter +int npix, dtype, imgnln() +errchk imgnln + +begin + npix = imgnln (imdes, lineptr, v, TY_REAL) + + if (npix != EOF) { + dtype = IM_PIXTYPE(imdes) + if (dtype != TY_REAL) + call imupkr (Memr[lineptr], Memr[lineptr], npix, dtype) + } + + return (npix) +end -- cgit