The automation and optimization of the Automated Prostate Positioning System