Fixed derivative bug. added function that casts to MRImage ptr.
added rigid registration test
Small changes for registration
updated smoothing function to be faster