Abstract
Lung cancer radiotherapy is a complex treatment modality, heavily influenced by tumor motion and the shifting positions of organs at risk (OARs) during the respiratory cycle. This study proposes a personalized radiotherapy planning approach that incorporates respiratory dynamics by utilizing 4D CT imaging. The method integrates advanced segmentation techniques, motion tracking, and optical flow algorithms to track tumor displacement and the relative positions of OARs throughout different respiratory phases. Initially, segmentation is performed using a modified ResNet-50 architecture, tailored to delineate the lungs, tumors, and critical structures accurately. This architecture is enhanced by replacing the last layers with specialized ones to improve resolution and boundary delineation. To address the dynamic nature of respiratory motion, motion tracking algorithms are used to monitor and predict tumor displacement in real time. Additionally, optical flow techniques are employed to assess and compensate for inter-phase motion. For each respiratory phase, segmented slices are reconstructed in 3D using the marching cube algorithm, providing a detailed, continuous representation of the anatomical structures involved. The optimal respiratory phase for treatment is determined by analyzing tumor and OAR movement, ensuring minimal radiation exposure to healthy tissues while maximizing tumor irradiation. This approach has objectified that the choice of the ideal phase varies from one patient to another, depending on tumor size, location, and the proximity of organs at risk. The system is designed to automatically identify this optimal phase, enhancing the accuracy and effectiveness of radiotherapy and leading to improved patient outcomes.