Set block values in a quadtree decomposition.
J=qtsetblk(I,S,dim,vals) sets all the dim-by-dim blocks in the quadtree decomposition (S returned by qtdecomp) of I to dim-by-dim blocks in vals, which is itself a dim-by-dim-by-k array. k is the number of dim-by-dim blocks in the quadtree decomposition.
See also: qtdecomp, qtgetblk.
The following code
J=qtsetblk(eye(4),qtdecomp(eye(4)),2,ones(2,2,2)) % Sets upper-right and lower-left blocks of 2*2 zeros to ones
Produces the following output
J = 1 0 1 1 0 1 1 1 1 1 1 0 1 1 0 1
Package: image