Abstract. This paper deals with the theory and applications of spatially-variant mathematical morphology. We formalize the definition of spatially variant dilation/erosion and opening/closing for gray-level images using exclusively the structuring function, without resorting to complement. This sound theoretical framework allows to build morphological operators whose structuring elements can locally adapt their orientation across the dominant direction of image structures. The orientation at each pixel is extracted by means of a diffusion process of the average square gradient field, which regularizes and extends the orientation information from the edges of the objects to the homogeneous areas of the image. The proposed filters are used for enhancement of anisotropic images features such as coherent, flow-like structures.