An apparatus and method for establishing a global coordinate system to facilitate robotic assisted surgery. The coordinate system may be established using a combination of the robotic data, i.e., kinematics, and optical coherence tomographic images generated by an overhead optical assembly and a tool-based sensor. Using these components, the system may generate a computer-registered three-dimensional model of the patient's eye. In some embodiments, the system may also generate a virtual boundary within the coordinate system to prevent inadvertent injury to the patient.