This paper describes the generation of shape primitive detecting masks and their application in measurements on shapes as well as in conditions for topology preservation as used in skeletonization. The formalism is expanded from two- to four-dimensional images and elaborates on the extension of 3D skeletonization to 4D skeletonization.