0001 function [blks, subs, sz] = pr_procsubs(wvlt,imsz,scales,subs)
0002
0003
0004
0005
0006
0007 if nargin < 4
0008 error('Need four args')
0009 end
0010
0011
0012 [tmp qs nquads] = levels(wvlt,imsz,scales);
0013
0014
0015 fullinds = {1:scales+1, 1:nquads-1};
0016 if length(subs) < 2
0017 subs{2} = ':';
0018 end
0019 for i = 1:2
0020 if subs{i} == ':'
0021 subs{i} = fullinds{i};
0022 end
0023 subs{i} = fullinds{i}(subs{i});
0024 end
0025
0026 blks = [];
0027 for l = subs{1}
0028 if l > scales
0029 if any(subs{2}==1)
0030 blks = [blks qs{l}];
0031 end
0032 else
0033 for q = subs{2}
0034 blks = [blks qs{l}(q)];
0035 end
0036 end
0037 end
0038
0039
0040 bno = length(blks);
0041 sz = zeros(bno,1);
0042 for b = 1:bno
0043 sz(b) = phiw_lims('size', blks{b});
0044 end