A method, apparatus and computer program code for automatically planning
at least a part of a surgical procedure to be carried out on a body part
of a patient are described. A virtual model of the body part is provided,
in which the model has data associated with it representing at least a
part of a planned surgical procedure. The virtual model is then morphed
to the body part using data derived from the patient's real body part
thereby also adapting the part of the planned surgical procedure to
reflect the anatomy of the patient's real body part.