Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

verification question #13

Open
zjin-lcf opened this issue Jan 21, 2022 · 0 comments
Open

verification question #13

zjin-lcf opened this issue Jan 21, 2022 · 0 comments

Comments

@zjin-lcf
Copy link

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])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant