PRO contour_mov,inmov,conima,lev,outmov ; ; Adding contours to a movie ; - the result is a byte movie, only for visualization. ; INPUTS: inmov - input movie ; conima - image for contours; must have same image size like inmov ; lev - contour levels (array) ; OUTPUT: outmov - output byte movie ; CALLING: contour_mov,inmov,conima,[lev1,lev2,...],outmov ; ; 11 Nov 2016, Michal ; on_error,1 si=size(inmov) sc=size(conima) if sc(1) ne si(1) or sc(2) ne si(2) then message, $ 'ERROR: Contour image must have the same size as movie frames' outmov=bytarr(si(1),si(2),si(3)) loadct,0 ;necessary to keep the full intensity range window,2,xs=si(1),ys=si(2) for i=0,si(3)-1 do begin tvscl,inmov(*,*,i) contour,conima,levels=lev,/noerase,xst=5,yst=5,position=[0,0,1,1] ;,color=0 a=tvrd() outmov(*,*,i)=a endfor wdelete,2 END