From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- pkg/proto/vol/src/i2sun/trsetup.x | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pkg/proto/vol/src/i2sun/trsetup.x (limited to 'pkg/proto/vol/src/i2sun/trsetup.x') diff --git a/pkg/proto/vol/src/i2sun/trsetup.x b/pkg/proto/vol/src/i2sun/trsetup.x new file mode 100644 index 00000000..1b14afb2 --- /dev/null +++ b/pkg/proto/vol/src/i2sun/trsetup.x @@ -0,0 +1,32 @@ +include +include "i2sun.h" + + +# TR_SETUP -- Set up spatial transformation parameters. + +procedure tr_setup (im, tr) + +pointer im # An input image descriptor +pointer tr # Transformation structure + +int ncols, nlines + +begin + ncols = IM_LEN(im,COL) + nlines = IM_LEN(im,LINE) + + # Determine output raster dimensions. + TR_XS(tr) = 1 + TR_XE(tr) = ncols + if (!IS_INDEFI(TR_XSIZE(tr))) + TR_XE(tr) = max (1, TR_XSIZE(tr)) + else if (TR_XMAG(tr) != 1.0) + TR_XE(tr) = max (1, ncols * int(TR_XMAG(tr))) + + TR_YS(tr) = 1 + TR_YE(tr) = nlines + if (!IS_INDEFI(TR_YSIZE(tr))) + TR_YE(tr) = max (1, TR_YSIZE(tr)) + else if (TR_YMAG(tr) != 1.0) + TR_YE(tr) = max (1, nlines * int(TR_YMAG(tr))) +end -- cgit