PlanCoor | R Documentation |
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.
PlanCoor( folder.name, lower.val = 0, upper.val = 250, ratio = 1,
fig.opt = TRUE, np = NULL, unit = "unitless", verbose = TRUE )
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 |
verbose |
an optional argument allowing the user to suppress the printing of computation progress. |
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
.
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 |
y |
the |
In the folder, one image is also allowed. Assume that all grayscale .bmp images are saved in
a folder named "Image" in the current working directory. Using PlanCoor(folder.name = "Image",
fig.opt = FALSE)
can obtain the x
- and y
-coordinates of the profiles.
\quad
The PlanCoor
function can also be used to extract two-dimensional profiles
of other objects, such as leaves. The leaf profile can first be obtained using image processing
software (e.g., Adobe Photoshop). It is recommended to fill the exterior of the leaf profile
in black and the interior in white. In such cases, the values of lower.val
and upper.val
should be adjusted accordingly to ensure a clear leaf profile is extracted.
Peijian Shi pjshi@njfu.edu.cn, Johan Gielis johan.gielis@uantwerpen.be, Brady K. Quinn Brady.Quinn@dfo-mpo.gc.ca.
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/nyas.15000")}
fitAM
, SAMs
, SurfaceAreaAM
, VolumeAM
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.