made Skeletonize work on image stacks