splitROI: Splits a ROI into multiple subrois for spatial analysis

Description Usage Arguments Details Value Author(s)

View source: R/splitROI.R

Description

This function allows to split a roi into different subrois for a pixel-based analysis.

Usage

1
splitROI(roi.data, nsplit, names=NULL)

Arguments

roi.data

An object with roi data as in output from DrawROI() function

nsplit

The number of sub-rois in which your ROI must be divided into

names

Optional names for roi. If omitted rois will be progressively numbered (i.e, roi1, roi2, roi3, etc.)

Details

This function allows to split a large ROI into smaller ones. This is needed to make computationally feasible the pixel-based analysis with large ROIs and/or high resolution images. As a general indication, approx 10000 pixels per sub-ROI is the upper limit for a computationally feasible spatial analysis, so set nsplit argument accordingly. The number of pixels in a ROI essentially controls the dimension of the VI.data object you generate with extractVIs function. A large VI.data object (typically larger than 200 Mb) will fast saturate your RAM and slow down the spatial analysis.

Value

A names list of length = nsplit and where each element has the same structure as a roi.data extracted by DrawROI.

Author(s)

Gianluca Filippa <gian.filippa@gmail.com>


gianlucafilippa/phenopix documentation built on Nov. 4, 2019, 1:06 p.m.