Euler obstruction and indices of vector fields