Open Vive940219 opened 4 years ago
Subtracting the mean of X0 places the origin of the transformation at the center of the image volume - this is somewhat more natural for transformations like rigid motions, else the volume would rotate around one of its corners. (Sorry for the delayed response)
hello, I am using your code to realize the lddmm, but I am curious about why you X0-np.mean(X0) for the grids instead use the original grids X0 = range(imgsize)?
self.X0 = torch.tensor(X0-np.mean(X0)).type(self.params['dtype']).to(device=self.params['cuda']) self.X1 = torch.tensor(X1-np.mean(X1)).type(self.params['dtype']).to(device=self.params['cuda'])