def METHOD_NAME(self, shiftField):
    #self.shiftField = shiftField
    #self.shiftFieldName = sfname
    x1, y1, x2, y2 = self.ROI
    x1 = x1 - 1
    y1 = y1 - 1
    X, Y = numpy.ogrid[:self.sliceShape[0], :self.sliceShape[1]]
    X += x1
    Y += y1
    Xn = numpy.round(X - x1 - shiftField[0](X*self.voxelsize[0], Y*self.voxelsize[1])/self.voxelsize[0]).astype('i')
    Yn = numpy.round(Y - y1 - shiftField[1](X*self.voxelsize[0], Y*self.voxelsize[1])/self.voxelsize[1]).astype('i')
    #Xn = numpy.clip(Xn, 0, )
    #x1, y1, x2, y2 = self.ROI
    #x1 = x1 - 1
    #x2 = self.scope.cam.GetROIX2()
    #y1 = y1 - 1
    #print self.X2.shape
    #Xn = self.X2[x1:x2, y1:(y1 + self.sliceShape[1])] - x1
    #Yn = self.Y2[x1:x2, y1:(y1 + self.sliceShape[1])] - y1
    #print Xn.shape
    print(self.sliceShape)
    self.Xn = numpy.maximum(numpy.minimum(Xn, self.sliceShape[0]-1), 0)
    self.Yn = numpy.maximum(numpy.minimum(Yn, self.sliceShape[1]-1), 0)