BUG: Error handeling when no transform given.

When no transform type is given, a better error message must be created.
The exception handeling of this case was updated.
PERF: Prefer initialization to assignment

performance,redundantAssignment,Variable 'OrientedMaskImage' is reassigned a value before the old one has been used.