taken from ITK