fix itkProcessRegistration crash with 4d input

Changed behaviour : Instead of crashing, we now handle an itk exception in itkProcessRegistration.cpp. Will now propogate a return value to caller regarding outcome of call to setInput and Update for the CastFilter. If we return false, the view will be cleaned.

Additional refactoring done in itkProcessRegistration to reduce duplicate code.

This PR fixes #180