3D segmentation of esophagus in thoracic CT images for radiation theraphy planning