N-way modeling for wavelet filter determination in multivariate image analysis