Created Function for reading and sampling 2D/3D image data

closes-#3544
Can you double-check this?  The second argument to `std::string::substr` is the *length* of the substring, but you are passing it `found`, which is the *position* of the last trailing slash in the string.