We propose to solve an image segmentation problem with connectivity constraints via projection onto the constraint set. The constraints form a convex set and the convex image segmentation problem with a total variation regularizer can be solved to global optimality in a primal-dual framework. Efficiency is achieved by directly computing the update of the primal variable via a projection onto the constraint set, which results in a special quadratic programming problem similar to the problems studied as isotonic regression methods in statistics, which can be solved with
) complexity. We show that especially for segmentation problems with long range connections this method is by orders of magnitudes more efficient, both in iteration number and runtime, than solving the dual of the constrained optimization problem. Experiments validate the usefulness of connectivity constraints for segmenting thin structures such as veins and arteries in medical image analysis.