Change ReadImageToDatum in io.hpp