AFM.getLine returns the data from either a horizontal or vertial line. The AFM.setLine sets the data for that line. Only a vector with the data is submitted.
AFM.setLine(obj, lineData, xPixel = NA, yPixel = NA, no = 1, verbose = FALSE)
AFMdata object
vector with new values
vertical line at this pixel (1 to image resolution), if NA
will use yPixel
horizontal line at this pixel (1 to image resolution), if NA
will use xPixel
channel number
if TRUE
, output additional information
AFMdata object with new line
a = AFM.artificialImage(height=10, width=10, verbose=FALSE)
b = AFM.getLine(a, yPixel = 1, dataOnly = TRUE)
lineData = rep(b$z[1], length(b$x))
a1 <- AFM.setLine(a, lineData, yPixel = 1)
plot(a1)
#> Graphing: HeightTrace