function WIWT2PO, wc,L,qmf ;+ ; NAME: ; WIWT2PO ; ; PURPOSE: ; This function performs an inverse 2-dimensional wavelet transform ; (periodized, orthonormal). ; ; CATEGORY: ; Wavelets ; ; CALLING SEQUENCE: ; x = WIWT2PO(wc,L,qmf) ; ; INPUTS: ; wc: 2-d wavelet transform [n by n array, n dyadic] ; L: coarse level ; qmf: quadrature mirror filter ; ; OUTPUTS: ; x: 2-d signal reconstructed from wc. ; ; NOTES: ; If wc is the result of a forward 2d wavelet transform, with ; wc = WFWT2PO(x,L,qmf) then x = WIWT2PO(wc,L,qmf) reconstructs ; exactly if qmf is a nice quadrature mirror filter, e.g. one made ; by WMKOFILT. ; ; EXAMPLE: ; ; SEE ALSO: ; wfwt2po, wmkofilt ; ; MODIFICATION HISTORY: ; Written by: Amara Graps November, 1994 ;Translated from MatLab Wavelab routine: iwt2_po.m ;- n = WQUADLEN(wc,J) x = wc nc = 2^(L+1) FOR jscal=L, J-1 DO BEGIN ;use the IDL way to create an index array a = FIX(nc/2+1) & b = 1 & c = nc top = WMKIARRY( a, b, c) a = 1 & b = 1 & c = fix(nc/2) bot = WMKIARRY( a, b, c) a = 1 & b = 1 & c = nc all = WMKIARRY( a, b, c) FOR iy=1, nc DO BEGIN x(iy-1, all) = TRANSPOSE(WUPDYDLO(TRANSPOSE(x(iy-1,bot)),qmf)) $ + TRANSPOSE(WUPDYDHI(TRANSPOSE(x(iy-1,top)),qmf)) end FOR ix=1, nc DO BEGIN x(all, ix-1) = WUPDYDLO(x(bot, ix-1),qmf) $ + WUPDYDHI(x(top, ix-1),qmf) END nc = 2*nc END ; ; Algorithm Source: WaveLab Version 0.600 ; WaveLab WWW site: http://playfair.stanford.edu/ ; WaveLab Questions? e-mail wavelab@playfair.stanford.edu ; RETURN, x END ;***************************************************