Two images are overlaid and a slider is provided to interactively
compare the two images in a before-after like fashion. img1 and
img2 can either be two RasterLayers, two RasterBricks/Stacks or
two character strings. In the latter case it is assumed that these
point to .png images on the disk.
This is a modified implementation of http://bl.ocks.org/rfriberg/8327361
Usage
## S4 method for signature 'RasterStackBrick,RasterStackBrick'
slideView(img1, img2, r = 3,
g = 2, b = 1, na.color = mapviewGetOption("na.color"),
maxpixels = mapviewGetOption("plainview.maxpixels"), ...)
## S4 method for signature 'RasterLayer,RasterLayer'
slideView(img1, img2,
col.regions = mapviewGetOption("raster.palette")(256),
na.color = mapviewGetOption("na.color"),
maxpixels = mapviewGetOption("plainview.maxpixels"))
## S4 method for signature 'character,character'
slideView(img1, img2)
## S4 method for signature 'ANY'
slideview(...)
Arguments
img1
a RasterStack/Brick, RasterLayer or path to a .png file
img2
a RasterStack/Brick, RasterLayer or path to a .png file
r
integer. Index of the Red channel, between 1 and nlayers(x)
g
integer. Index of the Green channel, between 1 and nlayers(x)
b
integer. Index of the Blue channel, between 1 and nlayers(x)
na.color
the color to be used for NA pixels
maxpixels
integer > 0. Maximum number of cells to use for the plot.
If maxpixels < ncell(x), sampleRegular is used before plotting.
...
additional arguments passed on to repective functions.
col.regions
color (palette).See levelplot for details.
color
the color palette to be used for visualising RasterLayers
Details
Compare two images trough interactive swiping overlay
Methods (by class)
img1 = RasterLayer,img2 = RasterLayer: for RasterLayers