returns output dimensions for wavelet transformed vol, input dimensions idim FORMAT odim = outdim(w, idim) This template function assumes dyadic dimensions are required and that first two output dimensions must be the same $Id: outdim.m,v 1.3 2005/06/05 04:42:22 matthewbrett Exp $
0001 function odim = outdim(w, idim) 0002 % returns output dimensions for wavelet transformed vol, input dimensions idim 0003 % FORMAT odim = outdim(w, idim) 0004 % 0005 % This template function assumes dyadic dimensions are 0006 % required and that first two output dimensions must be the same 0007 % 0008 % $Id: outdim.m,v 1.3 2005/06/05 04:42:22 matthewbrett Exp $ 0009 0010 if nargin < 2 0011 error('Need input dimensions'); 0012 end 0013 idim2 = idim(:)'; 0014 if pr_ndims2(idim2) > 1 0015 idim2(1:2) = max(idim2(1:2)); 0016 end 0017 odim = 2.^(ceil(log2(idim2)));