1
! @(#)replace.prg 19.1 (ES0-DMD) 02/25/03 14:09:00
2
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4
! MIDAS procedure replace.prg to implement REPLACE/IMAGE, /POLYGON
5
! K. Banse 901023, 920109, 920401
7
! use via REPLACE/IMAGE inframe outframe test/lo,hi=repla
8
! inframe = input image
9
! outframe = output image
11
! low,hi = real intensity interval for replacement
13
! second input image or
14
! second input image 'op' constant
16
! REPLACE/POLYGON in,intable out test/lo,hi=repla
18
! intable = optional table with subimages of 'in'
21
! low,hi = real low + high threshold for polygon detection
22
! repla = constant or second input image
24
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
28
define/param p2 ? IMA "Enter output image: "
30
if mid$cmnd(11:11) .eq. "I" then
34
define/param p1 ? IMA "Enter input image: "
35
define/param p3 ? C "Enter replacement specs: "
37
if p2(1:1) .eq. "+" then
38
write/keyw out_a {p1} !output = input frame
42
write/keyw history "REPLACE/IMAGE "
49
define/local itab/i/1/1 0 !look for input table
50
itab = m$index(p1,",")
53
write/keyw in_a {p1(1:{itab})}
55
write/keyw inputc {p1({itab}:>)}
62
itab = m$index(p3,"/")
65
write/keyw in_b {p3(1:{itab})}
67
write/keyw p4 {p3({itab}:>)} !fill P4 correctly
69
write/keyw in_b {in_a} !test frame = inframe
74
write/keyw history "REPLACE/POLYGON "