update testImageHelper into testSliceFromFunctor