This work is a novel contribution for enriching medical images using semantic annotations with a strategy for unifying different ontologies and instances of DICOM medical files. We present the L-MOM library (Library for Mapping of Ontological Metadata) as a tool for making an automatic mapping between instances of DICOM medical files and different medical ontologies (e.g., FMA, RadLex, MeSH). The main contributions are: i) the domain independent L-MOM library which is able to integrate DICOM metadata with ontologies from different domains; ii) a strategy to automatically annotate DICOM data with universally accepted medical ontologies, and provide values of similarity between ontologies and DICOM metadata; and iii) a framework to traverse ontological concepts that characterized clinical studies of patients registered in the framework catalog.