Learn R Programming

biogeom (version 1.5.0)

PlanCoor: Extracts the Planar Coordinates the 2-D Profiles of Apical Meristems

Description

PlanCoor is used to extract the planar coordinates the 2-D profiles of shoot or root apical meristems in grayscale bitmap (.bmp) images saved in a folder.

Usage

PlanCoor( folder.name, lower.val = 0, upper.val = 250, ratio = 1,  
          fig.opt = TRUE, np = NULL, unit = "unitless", verbose = TRUE )

Value

FileName

the names of the files in the folder but removing the file extension (e.g., "myimage" from a file named "myimage.bmp" by dropping its extension ".bmp").

x

the \(x\)-coordinates of the profile curve(s).

y

the \(y\)-coordinates of the profile curve(s).

Arguments

folder.name

the name of a folder that saves the 2-D profiles of shoot or root apical meristems in grayscale .bmp images

lower.val

the lower bound of pixel values for selecting an AM's profile curve from a grayscale image.

upper.val

the upper bound of pixel values for selecting an AM's profile curve from a grayscale image.

ratio

the scaling factor between the actual image dimensions and the desired coordinate system scale.

fig.opt

an optional argument to draw the extracted the AM's profile curve.

np

the number of data points forming an AM's profile curve.

unit

the unit of the \(x\)-axis and the \(y\)-axis when showing an AM's profile curve.

verbose

an optional argument allowing the user to suppress the printing of computation progress.

Author

Peijian Shi pjshi@njfu.edu.cn, Johan Gielis johan.gielis@uantwerpen.be, Brady K. Quinn Brady.Quinn@dfo-mpo.gc.ca.

Details

The apical meristem profiles are recommended to be extracted using the Pen Tool in Adobe Photoshop (version >= 22.4.2; Adobe, San Jose, CA, USA) and saved as grayscale bitmap (.bmp) images. In each image, the profile should be depicted in black or a gray value close to black, whereas the remaining areas should be set to white (with pixel values of 255). All profiles are recommended to be adjusted to form downward-opening curves using Adobe Photoshop. The resulting profiles are to be saved in a folder within the current R working directory. The name of this folder is used as an argument folder.name in the PlanCoor function. Users can adjust the values of lower.val and upper.val to enhance the clarity of the shoot or root apical meristem profiles. The argument ratio represents the scaling factor between the actual image dimensions and the desired coordinate system scale. For example, if an image has a width of 7 cm and a height of 10 cm, setting ratio = 2 will result in \(x\)- and \(y\)-coordinates being mapped to a window of 14 cm by 20 cm. The default of np is NULL, and the number of data points forming an AM's profile curve depends on the resolution of the image and the size of the extracted AM's profile. If the use defines an integer such as 500, the final number of data points is equal to the minimum value of 500 and the number of data point when np = NULL.

References

Shi, P., Chen, L., Quinn, B.K., Yu, K., Miao, Q., Guo, X., Lian, M., Gielis, J., Niklas, K.J. (2023) A simple way to calculate the volume and surface area of avian eggs. Annals of the New York Academy of Sciences 1524, 118\(-\)131. tools:::Rd_expr_doi("10.1111/nyas.15000")

See Also

fitAM, SAMs, SurfaceAreaAM, VolumeAM

Examples

Run this code
  folder_path1 <- system.file("extdata", "SAM", package="biogeom")
  bmp.res1     <- PlanCoor( folder_path1, lower.val = 0, upper.val = 250, 
                            fig.opt = TRUE, np = NULL )

  folder_path2 <- system.file("extdata", "Leaf", package="biogeom")
  bmp.res2     <- PlanCoor( folder_path2, lower.val = 1, upper.val = 254, 
                            fig.opt = TRUE, np = NULL, unit = "cm", verbose = FALSE )

  graphics.off()

Run the code above in your browser using DataLab