replaced throwing of strings by throwing invalid_argument
added the possibility to give a region of interest to patch extraction of the PyramidPatchExtractor