Modeling spatial context (e.g., autocorrelation) is a key challenge in classification and retrieval problems that arise in image processing regions. This work proposes a new approach for medical images retrieval enlightened by traditional Markov Random Field model and improve on it. Contrasting with previous work, this method relies on coping with the ambiguity of spatial relative position concepts: a new definition of the geometric relationship between two objects in a fuzzy set framework is proposed. This definition is based on a fuzzy pattern-matching approach, which comparing an object by the fuzzy set representation of the degree of position satisfaction to a reference object. Furthermore, Fuzzy Attributed Relational Graphs (FARGs) are used in this framework for the purpose of medical image similarity measurement.