Brain tumors are abnormal cells growth in the brain tissues that can be cancerous, or not. In any case, they could be a very aggressive disease that should be detected as early as possible. Usually, magnetic resonance imaging (MRI) is the main tool commonly adopted by neurologists and radiologists to identify and classify any possible anomalies present in the brain anatomy. In the present work, an automatic unsupervised method called Z2-$\gamma$, based on the use of adaptive finite-elements and suitable pre-processing and post-processing techniques, is introduced. In particular, the proposed methodology is able to automatically classify whether a given MR image represents a healthy or a diseased brain and in this latter case, is able to locate the tumor area.