An algorithm is proposed for skeletonization of 3-D images. The criterion to preserve connectivity is given in two versions: global and local. The latter allows local decisions in the erosion process. A table of the decisions for all possible configurations is given in this paper. The algorithm using this table can be directly implemented both on general purpose computers and on dedicated machinery.