%exam_bbP_2D
%illustration of the best basis decomposition of an image "bloch"
load BLOCH
figure;ai(bloch)

   set(gca,'XTick',[1 512])
set(gca,'XTickLabel',{'1','512'})
   set(gca,'YTick',[1 512])
set(gca,'YTickLabel',{'1','512'})
Par=4;%input('spline order; ?')
Dep=6;%input('depth of decomp; ?')

[wvtran, wctran, entro]=spl_WP_anaP2D(bloch,Par,Dep);

[ListBB]=WP_BB_Listree2_D_P(entro);

wtb=wtran_bestP(wvtran,ListBB);
figure;
for kk=1:6;
   eval(['subplot(2,3,' int2str(kk) ')'])
   W=wtb{kk};
   ai(W);title(['\fontsize{14}Lev' int2str(kk)]);
   set(gca,'XTick',[1 512])
set(gca,'XTickLabel',{'1','512'})
   set(gca,'YTick',[1 512])
set(gca,'YTickLabel',{'1','512'})

   %axis off
end;