Integrating GANs, Contrastive Learning, and Transformers for Robust Medical Image Analysis