Learn R Programming

phenopix (version 2.4.5)

splitROI: Splits a ROI into multiple subrois for spatial analysis

Description

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

Usage

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

Value

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

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.)

Author

Gianluca Filippa <gian.filippa@gmail.com>

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.