Modified fast marching filter