예제 #1
0
파일: apps.py 프로젝트: NanYoMy/cmmas
def tensor_of_warp_volumes_by_ddf(input_, ddf):
    grid_warped = util.get_reference_grid(
        ddf.shape[1:4]
    ) + ddf  #这种情况ddf会被转化为tf.constant https://stackoverflow.com/questions/49239136/what-happens-when-you-add-a-tensor-with-a-numpy-array
    warped = util.resample_linear(tf.cast(input_, dtype=tf.float32),
                                  grid_warped)
    return warped
예제 #2
0
파일: regnet.py 프로젝트: NanYoMy/cmmas
 def warp_FIX_image(self, input_):
     return util.resample_linear(input_, self.grid_warped_FIX_MV)
예제 #3
0
파일: regnet.py 프로젝트: NanYoMy/cmmas
 def warp_image(self,image,ddf):
     return util.resample_linear(image, ddf)