This code is copied from sources found in ITK 5.1.0.
It is distributed under the Apache 2.0 license.
