Cancer has long been one of the major threats to human health. As radiotherapy been one of the key effective methods for cancer treatment, the global demand for radiotherapy technology is experiencing a significant surge. Medical imaging, medical image analysis, and radiotherapy planning are fundamental computational tasks of radiotherapy and they directly impact the accuracy of radiotherapy. Concurrently, the progress in medical imaging modalities and radiation therapy planning has given rise to various applied mathematical challenges, including large-scale inverse problems, nonconvex and nonsmooth optimization problems, etc. Over the past years, I have developed a series of image processing and reconstruction methods for high-dimensional medical imaging, contributing to the enhancement of accuracy in radiotherapy planning. Recently, our research has delved into radiotherapy problems with the mentioned challenges. In this presentation, I will introduce some mathematic methods for high-resolution, dynamic imaging, multimodal medical imaging, and medical image analysis to develop more accurate radiotherapy dose distributions that are interpretable for the rumors. Through the synergy of imaging techniques and image analysis, I will also introduce introduce some of our nonconvex, nonsmooth, and stochastic optimization methods that aim to efficiently and stably solve the Flash radiotherapy planning and Robust radiotherapy planning problems, showcasing the corresponding planning results.