function f = IRT2_BIO(w,h,g,sh,sg,alfa);

% IRT2_BIO -- Inverse Redundant Biorthogonal WT
%  Usage
%    f = IRT2_BIO(w,h,g,sh,sg,alfa)
%  Inputs
%    w      wavelet coefficients of image
%              (! 4D array!)
%    h,sh   lp filter and shift
%    g,sg   hp filter and shift
%    alfa   
%
% Outputs
%    f      inverse transform
%
%  Description
%    Does the inverse redundant Biorthogonal transform


M = size(w,1)-1;
n = size(w,3);
m = size(w,4);

s = zeros(n,m);
s(:,:) = w(M+1,1,:,:);
w1 = zeros(n,m);
w2 = zeros(n,m);
w3 = zeros(n,m);
for j = M:-1:1
   w1(:,:) = w(j,1,:,:);
   w2(:,:) = w(j,2,:,:);
   w3(:,:) = w(j,3,:,:);
   whor = IRT_1step(w2',w3',j,h,g,sh,sg,alfa)';
   shor = IRT_1step(s',w1',j,h,g,sh,sg,alfa)';
   s = IRT_1step(shor,whor,j,h,g,sh,sg,alfa);
end
f = s;
