A system for automatic segmentation of tumor tissue, useful for motion correction during radiotherapy using real-time imaging, identifies multiple regions based on the values of data and then identifies the tumors within the regions based on a priori knowledge about tumor size and/or location. The regions may be refined with robust and fast morphological operations, providing segmentation at speeds commensurate with the motion to be corrected.