Research in many disciplines stands on the analysis of complex high-dimensional data sets. For example, in clinical neuroscience, large collections of brain images from different subjects are obtained by advanced scanning techniques to study variations in different neurological states. Developing new tools to analyse the main characteristics of these rich data sets is needed. We consider the basic unit of observation to be a general function, which is defined and takes values in spaces of arbitrary dimension. On the basis of a notion of depth for general functions denoted as multivariate volume depth (MVD), images will be ranked from centre to outward and robust estimators can be defined. The theoretical properties of MVD are established, and several non-parametric depth-based permutation tests for comparing two groups of images are proposed; in particular, we introduce two-sample location tests based on MVD. In addition, dispersion measures for a sample of images are introduced and used for testing two sample differences in dispersion. All the proposed tests are calibrated in an extensive simulation study. These statistical tools are applied to detect whether there are differences between the brain images from healthy individuals and patients with major depressive disorders. Copyright (c) 2017 John Wiley & Sons, Ltd.