We present a new segmentation method for extracting thin structures embedded in three-dimensional medical images based on modern variational principles. We demonstrate the importance of the edge alignment and homogeneity terms in the segmentation of blood vessels and vascular trees. For that goal, the Chan-Vese minimal variance method is combined with the boundary alignment, and the geodesic active surface models. An efficient numerical scheme is proposed. In order to simultaneously detect a number of different objects in the image, a hierarchal approach is applied.