This paper describes a method to integrate digital topology informations in image processing libraries. This additional information allows a library user to write algorithms respecting topological constraints, for example a seed fill or a skeletonization algorithm. As digital topology is absent from most image processing libraries, such constraints cannot be fulfilled. We describe and give code samples for all the structures necessary for this integration, and show a use case in the form of a homotopic thinning filter inside ITK. The obtained filter can be up to a hundred times as fast as ITK’s thinning filter and works for any image dimension. This paper mainly deals of integration within ITK, but can be adapted with only minor modifications to other image processing libraries. Key words: Digital topology, image processing library, ITK, code genericity.