Gravar-mail: Optimal Embedding for Shape Indexing in Medical Image Databases