Due to the risk of radiation from computed tomography (CT) scanning on the human body, the number of CT scans that can be performed on an individual each year is limited. However, CT images play a very important role in medical diagnosis. Therefore, this study proposes a method of generating synthetic CT to solve this problem. Considering that magnetic resonance imaging (MRI) is not harmful to the human body, there is no limit on the number of scans that can be performed with this procedure. In this paper, an image segmentation method is used to segment an MRI, and each segment is given a corresponding Hounsfield Unit (HU) value to finally generate a synthetic CT image. Since the image segmentation performance directly affects the generated synthetic CT image, this paper introduces a multitask learning strategy into a maximum entropy clustering (MEC) algorithm. A multitask maximum entropy clustering (MT-MEC) algorithm is proposed, which is used to effectively segment the MRI of the brain. The algorithm can use knowledge from multiple tasks to improve the learning ability of all tasks, and the MEC algorithm can effectively avoid interference from noise. The experimental results show that the proposed MT-MEC algorithm has good image segmentation performance, which results in reliable performance of the final synthetic CT image.INDEX TERMS Synthetic CT, brain MRI, multitask learning, MEC algorithm.