added traits for 4d images.

As elastix also allows for 4d images, we need these traits. Btw: is there no easier way to write this once for a variable dimension?