To load a specific subregion from the image, use the arguments upper_left,
width, and height. These are expressed in raster coordinates, similar to
a spreadsheet layout: columns first, then rows. In other words, specify
coordinates as c(column, row), not c(row, column), which is typical
in data.frame objects.
While any image editor can be used to obtain these values, this function was
tested with ImageJ, particularly the Fiji
distribution. A recommended workflow:
Open the image in Fiji.
Draw a rectangular selection.
Go to Edit > Selection > Specify... to read upper_left, width, and height.