An exemplary embodiment provides a method including: creating a histogram of pixel values based on a CT image; determining a soft region peak, which is a peak in a soft tissue region in the histogram; and setting, based on the soft region peak, a threshold representing a lower limit of a bin value in a bone region in the histogram. The method may include automatically removing a bed portion from the CT image.