A
system and method are provided for using a computer
system to assist in planning a trajectory (960A, 960B) for a surgical
insertion into a
skull. The method comprises providing the computer
system with a three-dimensional representation of the
skull and of critical objects located within the
skull, wherein the critical objects comprise anatomical features to be avoided during the surgical
insertion. The method further comprises providing the computer system with a target location (770, 970) for the
insertion within the skull. The method further comprises generating by the computer system a first set comprising a plurality of entry points, each
entry point (760) representing a surface location on the skull, and each
entry point (760) being associated (2D) with a trajectory (960A, 960B) from the
entry point (760) to the target location (770, 970). The method further comprises discarding by the computer system entry points from the first set to form a second, reduced set comprising a plurality of entry points, wherein an entry point (760) is discarded from the first set of entry points if the entry point (760) has an
entry angle which fails a condition for being substantially perpendicular to the
skull surface. For each entry point (760) in the second set, the computer system assess the entry point (760) against a set of one or more criteria, wherein the set of one or more criteria includes a
risk factor based on the separation between the critical objects and the trajectory (960A, 960B) which is associated with said entry point (760)). This
risk factor may be calculated by integrating f(x) along the trajectory (960A, 960B) associated (2D) with the entry point (760), where x represents distance along the trajectory (960A, 960B) to a sample point, and f(x) is a function based on distance from the sample point at distance x to a critical object which is nearest to said sample point.