A couple of points:
1) It does not interpolate. This is okay for translations with this script because all translations are in integer quantities in each axis. But the lack of interpolations mean rotations will produce some unexpected artefacts.
2) You have to go into the code to add a fill value for shifted in data.
4) No documentation, so you have to torture yourself with mental tetris + trial and error to figure out how axes are set in this script
If you want to do 3d rigid transformations, your best bet is to use the Image Processing Toolbox's imwarp function, after specifying the centroid/frame origin. It provides functionality for interpolation (very important!). Also take note of what value it inserts to shifted in data when translation happens. Imwarp takes care of the fill values too. I know, MATLAB charges big bucks for it, but they have a perfect, efficient, and well documented implementation in imwarp. Yes, it's also a little bit more work to figure out imwarp - no pain no gain.
I gave the script a 1 star rating. That star is for participation!