siavashk / pycpd

Pure Numpy Implementation of the Coherent Point Drift Algorithm
MIT License
513 stars 115 forks source link

repeat self.intialize() fails due to change in shape of self.t #8

Closed tlambert03 closed 7 years ago

tlambert03 commented 7 years ago

registrations cannot be repeated because self.t changes shape during processing. self.t.shape == (1,3) after __init__, but self.t.shape == (3,) after self.register(),

so repeat calls to self.register() gives ValueError: operands could not be broadcast together with shapes in the line: self.TY = self.s * np.dot(self.Y, np.transpose(self.R)) + np.repeat(self.t, self.M, axis=0) (or the corresponding line in affine_registration)

siavashk commented 7 years ago

Thanks. I will look into it today.

siavashk commented 7 years ago

Fixed in 3ddd79e9445b89cdcd3cdc8135c3477fe4f7eb63

siavashk commented 7 years ago

By the way, I would be happy to review any of your pull requests for fixing bugs and adding more features. There is a Thanks.txt file which reflects those that have contributed to the repository.