3D level set esophagus segmentation in thoracic ct images using spatial, appearance and shape models