This work provides a model for tubular structures, and devises an algorithm to automatically extract tubular anatomical structures from medical imagery. Our model fits many anatomical structures in medical imagery, in particular, various fiber bundles in the brain (imaged through diffusion-weighted magnetic resonance (DW-MRI)) such as the cingulum bundle, and blood vessel trees in computed tomography angiograms (CTAs). Extraction of the cingulum bundle is of interest because of possible ties to schizophrenia, and extracting blood vessels is helpful in the diagnosis of cardiovascular diseases. The tubular model we propose has advantages over many existing approaches in literature: fewer degrees-of-freedom over a general deformable surface hence energies defined on such tubes are less sensitive to undesirable local minima, and the tube (in 3-D) can be naturally represented by a 4-D curve (a radius function and centerline), which leads to computationally less costly algorithms and has the advantage that the centerline of the tube is obtained without additional effort. Our model also generalizes to tubular trees, and the extraction algorithm that we design automatically detects and evolves branches of the tree. We demonstrate the performance of our algorithm on 20 datasets of DW-MRI data and 32 datasets of CTA, and quantify the results of our algorithm when expert segmentations are available.