morphomapRaster: morphomapRaster

Description Usage Arguments Value Author(s) Examples

View source: R/morphomapRaster.R

Description

Convert a section in a raster image. It is useful to save cross section at the real size

Usage

1
morphomapRaster(cp, mp, pixel = 1, filename, save = FALSE)

Arguments

cp

numeric: radius of the outline

mp

numeric: number of points along the outline

pixel

numeric: desired ratio pixel/mm

filename

character: path of the file to be saved

save

logical: if TRUE the raster image will be saved

Value

rimg raster image of the cross section

Author(s)

Antonio Profico, Luca Bondioli, Pasquale Raia, Paul O'Higgins, Damiano Marchi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(raster)
#rectangular section
extsec<-morphomapRectangle(10,6,100)
intsec<-morphomapRectangle(8,4,100)
rimg<-morphomapRaster(extsec,intsec,pixel=0.1,save=FALSE)
plot(rimg,col=gray(0:2/2))
#circular section
extsec<-morphomapCircle(10,100)
intsec<-morphomapCircle(8,100)
rimg<-morphomapRaster(extsec,intsec,pixel=0.1,save=FALSE)
plot(rimg,col=gray(0:2/2))

morphomap documentation built on Jan. 13, 2021, 6:27 a.m.