In multiple plan adaptive radiotherapy (ART) strategies of bladder cancer, a library of plans corresponding to different bladder volumes is created based on images acquired in early treatment sessions. Subsequently, the plan for the smallest PTV safely covering the bladder on cone-beam CT (CBCT) is selected as the plan of the day. The aim of this study is to develop an automatic bladder segmentation approach suitable for CBCT scans and test its ability to select the appropriate plan from the library of plans for such an ART procedure. Twenty-three bladder cancer patients with a planning CT and on average 11.6 CBCT scans were included in our study. For each patient, all CBCT scans were matched to the planning CT on bony anatomy. Bladder contours were manually delineated for each planning CT (for model building) and CBCT (for model building and validation). The automatic segmentation method consisted of two steps. A patient-specific bladder deformation model was built from the training data set of each patient (the planning CT and the first five CBCT scans). Then, the model was applied to automatically segment bladders in the validation data of the same patient (the remaining CBCT scans). Principal component analysis (PCA) was applied to the training data to model patient-specific bladder deformation patterns. The number of PCA modes for each patient was chosen such that the bladder shapes in the training set could be represented by such number of PCA modes with less than 0.1 cm mean residual error. The automatic segmentation started from the bladder shape of a reference CBCT, which was adjusted by changing the weight of each PCA mode. As a result, the segmentation contour was deformed consistently with the training set to fit the bladder in the validation image. A cost function was defined by the absolute difference between the directional gradient field of reference CBCT sampled on the corresponding bladder contour and the directional gradient field of validation CBCT sampled on the segmentation contour candidate. The cost function measured the goodness of fit of the segmentation on the validation image and was minimized using a simplex optimizer. For each validation CBCT image, the segmentations were done five times using a different reference CBCT. The one with the lowest cost function was selected as the final bladder segmentation. Volume- and distance-based metrics and the accuracy of plan selection were evaluated to quantify the performance. Two to four PCA modes were needed to represent the bladder shape variation with less than 0.1 cm average residual error for the training data of each patient. The automatically segmented bladders had a 78.5% mean conformity index with the manual delineations. The mean SD of the local residual error over all patients was 0.24 cm. The agreement of plan selection between automatic and manual bladder segmentations was 77.5%. PCA is an efficient method to describe patient-specific bladder deformation. The statistical-shape-based segmentation approach is robust to handle the relatively poor CBCT image quality and allows for fast and reliable automatic segmentation of the bladder on CBCT for selecting the appropriate plan from a library of plans.