Learn R Programming

AFM (version 1.0.0)

displayIn3D: Display a 3D image of an AFMImage and store it on disk.

Description

Display a 3D image of an AFMImage and store it on disk if fullfilename variable is set. It uses the rgl package.

Usage

displayIn3D(AFMImage, width, fullfilename, changeViewpoint)

Arguments

AFMImage
the AFM image to be displayed in three dimensions.
width
(optional) width of the image. Default is 512 pixels. Note: width can't be superior to screen resolution.
fullfilename
(optional) the directory and filename to save the png of the 3D image. If this variable is missing, the function will not save on disk the 3D image.
changeViewpoint
(optional) if TRUE, the viewpoint is changed. Default is TRUE.

Examples

Run this code
library(AFM)

data(AFMImageOfAluminiumInterface)
newAFMImage<-extractAFMImage(AFMImageOfAluminiumInterface, cornerX=50, cornerY=50, size=256)
displayIn3D(newAFMImage, 1024)

AFMImage<-importFromNanoscope("/user/ubuntu/myNanoscopeAnalysisAFMImage.txt")
displayIn3D(AFMImage, 1024, "/users/ubuntu/myRglAFMimage.png")

Run the code above in your browser using DataLab