Description Usage Arguments Details Value Author(s)
This function allows to draw one (or more) region(s) of interest (ROI) on a jpeg image.
1 2 | DrawROI(path_img_ref, path_ROIs, nroi = 1,
roi.names, file.type='.jpg')
|
path_img_ref |
Path in your folder for the reference image |
path_ROIs |
Path where to store image with ROI and ROI coordinates. |
nroi |
The number of ROIs you want to draw. |
roi.names |
A character vector with ROI names. |
file.type |
It must match the syntax of your file extension (e.g. .jpg, .JPG, .JPEG). Multiple types are allowed by concatenation with c(). |
The function allows to draw one or more ROIs on an image or to load saved ROIs.
The function uses locator
to locate points, closes the polygon and stores an RData with coordinates.
The use of locator is restricted to only some graphic devices. Tne function attempts to open an X11 device.
In Mac OS the poligon is closed by typing ESC key.
See locator
for details.
A list containing the following:
pixels.in.roi |
Data for pixels contained in the ROI |
vertices |
Vertices of the ROI |
Additionally, a jpeg image is returned with the ROI(s) drawn.
The same object that is returned is saved in the path specified in path_ROIs
Edoardo Cremonese <e.cremonese@arpa.vda.it>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.