@nabsabraham ; nice thing is you can do this in dipy !!! https://dipy.org/documentation/1.0.0./examples_built/affine_registration_3d/#example-affine-registration-3d excerpt: We can see that the images are far from aligned by drawing one on top of the other. The images don’t even have the same number of voxels, so in order to draw one on top of the other we need to resample the moving image on a grid of the same dimensions as the static image, we can do this by “transforming” the moving image using an identity transform
identity = np.eye(4)
affine_map = AffineMap(identity,
static.shape, static_grid2world,
moving.shape, moving_grid2world)
resampled = affine_map.transform(moving)
importError Traceback (most recent call last)
<ipython-input-4-4e678cb08f4a> in <module>
6 from dipy.data import get_fnames
7 import vtk
----> 8 from dipy.viz import window, actor
9 from dipy.tracking.streamline import Streamlines
10 from dipy.io.streamline import load_trk, save_trk
ImportError: cannot import name 'window' from 'dipy.viz' (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dipy/viz/init.py)