Split a minc apply job into batches and process it locally using a fork cluster generated by the parallel package.
mcMincApply(filenames, fun, ..., mask = NULL, tinyMask = FALSE, slab_sizes = NULL, temp_dir = getwd(), cores = getOption("mc.cores", parallel::detectCores() - 1), return_raw = FALSE, cleanup = TRUE, mask_vals = NULL, collate = simplify2minc)
filenames | Paths to the minc files to apply accross |
---|---|
fun | An arbitrary R function to be applied |
... | Additional arguments to pass to fun, see details for a warning |
mask | The mask used to select voxels to apply to |
tinyMask | Shrink the mask for testing |
slab_sizes | A 3 element vector indicating large a chunk of data to read from each minc file at a time defaults to one slice along the first dimension. |
temp_dir | A directory to hold mask files used in the job batching |
cores | the number of cores to use, defaults to the option
|
return_raw | An internal use argument that prevents the resulting object from being reordered and expanded. |
cleanup | Whether to delete temporary parallelization masks |
mask_vals | values of the mask over which to parallelize, defaults to subdividing all masked voxels into the specified number of batches |
collate | A function to collate the list into another object type |