Morphological variation in marine sessile organisms is frequently related to environmental factors. Quantifying such variation is relevant in a range of ecological studies. For example, analyzing the growth form of fossil organisms may indicate the state of the physical environment in which the organism lived. A quantitative morphological comparison is important in studies where marine sessile organisms are transplanted from one environment to another. This study presents a method for the quantitative analysis of three-dimensional (3D) images of scleractinian corals obtained with X-ray Computed Tomography scanning techniques. The advantage of Computed Tomography scanning is that a full 3D image of a complex branching object, including internal structures, can be obtained with a very high precision. There are several complications in the analysis of this data set. In the analysis of a complex branching object, landmark-based methods usually do not work and different approaches are required where various artifacts (for example cavities, holes in the skeleton, scanning artifacts, etc.) in the data set have to be removed before the analysis. A method is presented, which is based on the construction of a medial axis and a combination of image-processing techniques for the analysis of a 3D image of a complex branching object where the complications mentioned above can be overcome. The method is tested on a range of 3D images of samples of the branching scleractinian coral Madracis mirabilis collected at different depths. It is demonstrated that the morphological variation of these samples can be quantified, and that biologically relevant morphological characteristics, like branch-spacing and surface/volume ratios, can be computed. Electronic supplementary material The online version of this article (doi:10.1007/s00338-007-0270-6) contains supplementary material, which is available to authorized users.