factor out ViewerImgLoader as an interface (implemented by Hdf5ImageLoader)
such that there can be other backends besides hdf5 eventually.
safety check