Technical improvements in planning and dose delivery and in verification of patient positioning have substantially widened the therapeutic window for radiation treatment of cancer. However, changes in patient anatomy during the treatment limit the exploitation of these new techniques. To further improve radiation treatments, anatomical changes need to be modeled and accounted for. Nonrigid registration can be used for this purpose. This article describes the design, the implementation, and the validation of a new framework for nonrigid registration for radiotherapy applications. The core of this framework is an improved version of the thin plate spline robust point matching (TPS-RPM) algorithm. The TPS-RPM algorithm estimates a global correspondence and a transformation between the points that represent organs of interest belonging to two image sets. However, the algorithm does not allow for the inclusion of prior knowledge on the correspondence of subset of points, and therefore, it can lead to inconsistent anatomical solutions. In this article TPS-RPM was improved by employing a novel correspondence filter that supports simultaneous registration of multiple structures. The improved method allows for coherent organ registration and for the inclusion of user-defined landmarks, lines, and surfaces inside and outside of structures of interest. A procedure to generate control points from segmented organs is described. The framework parameters r and lambda, which control the number of points and the nonrigidness of the transformation, respectively, were optimized for three sites with different degrees of deformation (head and neck, prostate, and cervix) using two cases per site. For the head and neck cases, the salivary glands were manually contoured on CT scans, for the prostate cases the prostate and the vesicles, and for the cervix cases the cervix uterus, the bladder, and the rectum. The transformation error obtained using the best set of parameters was below 1 mm for all the studied cases. The lengths of the deformation vectors were on average (+/- 1 standard deviation) 5.8 +/- 2.5 and 2.6 +/- 1.1 mm for the head and neck cases, 7.2 +/- 4.5 and 8.6 +/- 1.9 mm for the prostate cases, and 19.0 +/- 11.6 and 14.5 +/- 9.3 mm for the cervix cases. Distinguishable anatomical features were identified for each case and were used to validate the registration by calculating residual distances after transformation: 1.5 +/- 0.8, 2.3 +/- 1.0, and 6.3 +/- 2.9 mm for the head and neck, prostate, and cervix sites, respectively. Finally, the authors demonstrated how the inclusion of these anatomical features in the registration process reduced the residual distances to 0.8 +/- 0.5, 0.6 +/- 0.5, and 1.3 +/- 0.7 mm for the head and neck, prostate, and cervix sites, respectively. The inclusion of additional anatomical features produced more anatomically coherent transformations without compromising the transformation error. The authors concluded that the presented nonrigid registration framework is a powerful tool to simultaneously register multiple segmented organs with very different complexities.