include include $for (silrdx) # FIXLINE -- Linearly interpolate lines across a region. procedure fixline$t (image, x1, x2, y1, y2) pointer image # Image pointer int x1, x2, y1, y2 # Region to be fixed int i, nx, ny $if (datatype == x) complex f1, f2 $else $if (datatype == d) double f1, f2 $else real f1, f2 $endif $endif pointer a, b, c pointer imgs2$t(), imps2$t() begin c = imps2$t (image, x1, x2, y1, y2) nx = x2 - x1 + 1 ny = y2 - y1 + 1 if (y1 == 1) { a = imgs2$t (image, x1, x2, y2 + 1, y2 + 1) do i = 1, ny call amov$t (Mem$t[a], Mem$t[c + (i - 1) * nx], nx) } else if (y2 == IM_LEN (image, 2)) { a = imgs2$t (image, x1, x2, y1 - 1, y1 - 1) do i = 1, ny call amov$t (Mem$t[a], Mem$t[c + (i - 1) * nx], nx) } else { call imseti (image, IM_NBUFS, 2) a = imgs2$t (image, x1, x2, y1 - 1, y1 - 1) b = imgs2$t (image, x1, x2, y2 + 1, y2 + 1) do i = 1, ny { f2 = i / (ny + 1.) f1 = 1 - f2 call awsu$t (Mem$t[a], Mem$t[b], Mem$t[c+(i-1)*nx], nx, f1, f2) } } end $endfor