Lasers can help surgeons rapidly analyse brain cancers and decide how much tissue to remove, a study shows.
It is a difficult decision as taking too little leads to the cancer coming back, while too much could lead to disability.
The technique, called SRS microscopy, has been tried on more than 360 patients at the University of Michigan Medical School and Harvard University.
The next stage is for it to be tested in full clinical trials.
"Brain cancer is like a cloud, you can define the centre, but the edges are really hard to discern," says one of the researchers, Dr Daniel Orringer.
In other cancers such as in the bowel doctors would just take some of the non-essential surrounding tissue as well.