After stitching all groups in sample_info with ImageJ, images of various resolutions (pixel dimensions) are left. This function creates copies of each image whose largest dimension is lowres_max_size pixels. It also creates a corresponding scalefactors_json.json file much like Spaceranger's. In conjunction with prep_imagej_image(), this function prepares for building the SpatialExperiment with build_spe().

prep_imagej_image(sample_info, out_dir, lowres_max_size = 1200)

Arguments

sample_info

A tibble with columns capture_area, group, imagej_image_path, spaceranger_dir, intra_group_scalar, and group_hires_scalef

out_dir

A character(1) vector giving a path to a directory to place the output image(s) and scale factors. Provided the parent exists, out_dir will be created if necessary.

lowres_max_size

An integer(1) vector: the resolution (number of pixels) of the larger dimension of the output image(s), considered to be "low resolution".

Author

Nicholas J. Eagles

Examples

if (FALSE) { # \dontrun{
#   For internal testing
sample_info <- readr::read_csv("dev/test_data/sample_info.csv")
prep_imagej_image(sample_info, tempdir())
} # }

## TODO: add working examples
args(prep_imagej_image)
#> function (sample_info, out_dir, lowres_max_size = 1200) 
#> NULL