Assessment of cross-sectional and longitudinal components of a difference with an algorithm of contour replacement