Home > phiwave > @phiw_wavelet > outdim.m

outdim

PURPOSE ^

returns output dimensions for wavelet transformed vol, input dimensions idim

SYNOPSIS ^

function odim = outdim(w, idim)

DESCRIPTION ^

 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 $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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)));

Generated on Wed 06-Jul-2005 18:07:21 by m2html © 2003