Adaptive homomorphic federated learning framework for multi-institutional medical imaging with optimized diagnostic accuracy