added traits for 4d images.
Changed formating so the template<> can be found.
Corrected an error with mixed dimensions.
Merge pull request #46 from tom-albrecht/4dTraits

added traits for 4d images.