Segmenting the prostate and rectum in CT imagery using anatomical constraints