Description Usage Arguments Value Author(s) Examples
View source: R/morphomapRaster.R
Convert a section in a raster image. It is useful to save cross section at the real size
1 | morphomapRaster(cp, mp, pixel = 1, filename, save = FALSE)
|
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 |
rimg raster image of the cross section
Antonio Profico, Luca Bondioli, Pasquale Raia, Paul O'Higgins, Damiano Marchi
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.