cuda_spatial_deform icon indicating copy to clipboard operation
cuda_spatial_deform copied to clipboard

verification question

Open zjin-lcf opened this issue 3 years ago • 0 comments

Could you please update the example so that people can see the verification is successful for augment ? Thank you.

 cuda_handle = Handle(array_image.shape, mode="mirror")
    # cuda_handle.test()
    # cuda_handle.scale(0.5)
    # cuda_handle.flip(do_y=True, do_x=True, do_z=True)
    # cuda_handle.translate(100, 100, 20)
    # cuda_handle.rotate(0.75 * np.pi, 0.75 * np.pi, 0.75 * np.pi)
    cuda_handle.elastic(sigma=5., alpha=200., mode='constant')
    cuda_handle.end_flag()

    # correct_ret = deform.spatial_augment(array_image, mode="mirror")
    # Warm up and Unit test
    for i in range(100):
        output = cuda_handle.augment(array_image, order=1)
    volOut=sitk.GetImageFromArray(output[0])
    sitk.WriteImage( volOut,"data/FLAIR_Elastic.nii.gz", True)
    import ipdb; ipdb.set_trace()
    # check(correct_ret, output[0])

zjin-lcf avatar Jan 21 '22 13:01 zjin-lcf