Incremental learning and federated learning for heterogeneous medical image analysis