R/calculate_intensity.R: Create a function (prepareRegions) for Step 2 of plotFeatures

Signed-off-by: Charles Joly Beauparlant <Charles.Joly-Beauparlant@crchul.ulaval.ca>