FUNCTION REPLA,in,ope,lim,val ; ;Result = repla(Input,Oper,Limit,Value) ; ;This function replaces the values above, below ;or equal to a Limit by a given Value. ;Result, Input should be arrays (images). ;Oper is a string 'eq', 'le' or 'ge'. ;Limit and Value are numbers of the same type like In. ; Michal. out=in if ope eq 'eq' then begin for i=0L,n_elements(in)-1 do begin if (in(i) eq lim) then out(i)=val endfor return,out endif if ope eq 'le' then begin for i=0L,n_elements(in)-1 do begin if (in(i) le lim) then out(i)=val endfor return,out endif if ope eq 'ge' then begin for i=0L,n_elements(in)-1 do begin if (in(i) ge lim) then out(i)=val endfor return,out endif print,' WRONG OPERATOR (allowed eq,le,ge), RESULT = INPUT' return,out END