- Fix bug for resampling, prevent index increment. - Refactor functions into static functions. - Fix issue in interpolateSegment not using correct indices for depthType != resamplingDepthType - Add unit tests