function x=spl_Wv_syntP_2D(wvtran,Par,DeTr)
%2D  synthesis of a  signal  'x'
%from the  set 'wvtran' of the spline wavelet transform coefficients
%Par -- spline order
%DeTr -depth of decomposition

%


[vx N]=size(wvtran);
Nl=N/2^(DeTr);
m=1:Nl;
fwLL=fft2(wvtran(m,m));
fwLH=fft2(wvtran(m,Nl+m));
fwHL=fft2(wvtran(Nl+m,m));
fwHH=fft2(wvtran(Nl+m,Nl+m));


for kk=1:DeTr
    
     Nl=2*Nl;  
     m=1:Nl;
     
  A=matr_transP(Nl,Par,Nl,-1); 
  fwL=[fwLL ;fwHL];
   fwH=[fwLH ;fwHH];
 [fwL]=transpose(wW_up3(fwL,fwH,A)); 
 [fwL,fwH]=havshB(fwL);
 [fwLL]=transpose(wW_up3(fwL,fwH,A));
 if kk<DeTr
     fwLH=fft2(wvtran(m,Nl+m));
fwHL=fft2(wvtran(Nl+m,m));
fwHH=fft2(wvtran(Nl+m,Nl+m));
     end 
   

end

x=real(ifft2(fwLL));
%%%%%%%%%%%%%%%%%%%%%%%%%%
