1. A preoperative method for automatically planning placement of markers in the vicinity of a target in a patient prior to a medical operation, said method comprising: receiving a 3D model of a thoracic anatomy; receiving a 3D model of the target in the vicinity of the thoracic anatomy; computing, prior to the medical operation, at least one candidate marker location wherein said step of computing is carried out automatically with a computer system comprising a processor operable to: a) identify at least one candidate marker location in the vicinity of the airways; b) assign a score to said candidate marker location based on at least one constraint selected from the group consisting of (i) whether said candidate marker location obstructs a view of another candidate marker location, (ii) whether a distance between said candidate marker location and another candidate marker location is greater than a minimum separation distance, and (iii) whether said candidate marker location is near an obstacle; and selecting at least one candidate marker location based on the score determined from the computing step.