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?
minor comment: can you stick template keyword to the struct, please?

```c++
};

template<>
struct …
```