When I load these two files in Slicer I can see that slicer automatically positions them in space according to their metadata and performs interpolation. I can tell that because (2) has a larger spacing than (1) and yet I can visualize slices from (2) as I scroll through (1).
I am writing a python script that take these two files and visualize them side to side. I don’t think I need to run registration since I already know the origin, spacing and orientation of each volume (as per their NRRD headers).
So, how can I do this: For each slice in (1) I want to show what would be the corresponding slice in (2)
I know that somehow I need to apply an affine transform and do some interpolation in (2) to change coordinates but I am a bit lost.
Since my frame of reference is (1), and say that its affine transform is $T_1$, perhaps I can apply $T_1^{-1}$ to (2) to obtain (2) in coordinates with respect to the origin and standard set of basis? But then what? how do I do interpolation? Any help is welcome. Thanks!
If you do all this in Slicer then you don’t have to worry about any low-level detail. You can set up two slice viewers to show the volumes that you need to see, set the slice plane normals to have the same direction, enable slice link, make it hot-linked (long-click on slice link icon and check the “Hot linked” checkbox).
When would one prefer regular link over hot link? If the views are going to be updated anyway, why not update them immediately instead of waiting to release the mouse?
It’s usually faster to only redraw the window where the mouse is moving and you are usually looking at the window where the mouse is, that’s why hot-link is just an option.