pyelastix
pyelastix copied to clipboard
Make the example self-sufficient
Hi, first of all, thanks for sharing the library! I would like to as you if it is possible to renew this link to get the example image?
imageio.imread('https://dl.dropboxusercontent.com/u/1463853/images/chelsea_morph1.png')
I'd like to second this request. If the test images were available, it would be relatively easy to check whether pyelastix is installed correctly or not.
It looks like I no longer have that image :)
Can either of you please provide a morphed version of chelsea, and post it here? Then I can update the example.
I'm sure we could, if there was any information on what kind of morphing was done to the image originally. Do you remember what you did to it?
In test_register_affine_gray the moving image is rotated by 15 degrees. That seems a little too simplistic though, so I'm guessing the morphed chelsea image had something different done.
Trying it anyway, the example script gives a poor result. I think the number of iterations is too low (the unit test uses 1000 iterations, instead of 500).

Top row: fixed image, moving image Bottom row: registered image, field[0], field[1]
Increasing the number of iterations to 1000 produces a much better result for this simple example. (EDIT: Actually, I'm having more trouble than you would expect reliably reproducing outputs, so it may not be solely to do with the number of iterations)
Do you remember what you did to it?
No I don't, but I think it would have been a morph. E.g. a displacement defined by a Gaussian blob.
I think the problem with the rotated image is that since the edges of the image are not attached its harder to get a good result.