So i was looking through this and it looks like it give this message when you are using some kind of dicom dir with multiple image sets. The MR localizer image for example might not have the same resolution as your main image and it complains when you try an assign the image from one set to the matrix that was defined based on a different image set. You might want to separate the acquisitions to avoid this.
Folks, I'm sorry, but I can't support this script at this time. I'm inclined to pull it, but since some folks are getting some use out of it, I'll leave it up for the time being.
The code is pretty well commented, so I think it should be possible for someone to get it working, and I'd be happy to update with bug fixes as they come in.
I wrote this code a long time ago when I was doing a specific project with dicom files. That was the last time I looked at such files, and I no longer have any to test with.