Synchronises x with the images in meta:
images in
metabut not inxare read and added,images in
xbut not inmetaare removed,images in
imgs_to_rereadare read again from their raw data files and replace the existing data (e.g. after re-analysis in ROXAS/ROXAS AI).
Usage
update_QWAdata(
x,
meta,
imgs_to_reread = NULL,
exclude_mode = NULL,
reset_manual_flags = TRUE
)Arguments
- x
a QWAdata object
- meta
a QWAimages object; defines the images in the updated data
- imgs_to_reread
optional character vector of
image_labelvalues whose raw data files are read again; must be a subset ofmeta$image_label.NULL(default) re-reads none.- exclude_mode
Deprecated, see
complete_flags().- reset_manual_flags
Logical; only applies to
imgs_to_reread. IfTRUE(default), any manual edits made via the flags Shiny app are reset. IfFALSE(i.e. assuming the dating was not affected by the re-analysis), the columns set in the flags app (colType"qc_input") are kept, and so isexclude_issueswhere it differs from the value derived from the old automatic flags.
Value
An updated QWAdata object
Details
For all read images, derived cell/ring measures and flag columns that are
already present in x are recalculated. Duplicate-ring flags
(duplicate_ring, exclude_dupl) are recalculated for all woodpiece-years
that contain an added, removed or re-read image, since overlaps may change;
any manual duplicate selection in these woodpiece-years is replaced.
Added and re-read images are treated as new data: their flags need to be
inspected again, e.g. in the flags Shiny app or by re-applying any custom
rule for exclude_issues. Only if a re-analysis was minor and did not
change the dating, use reset_manual_flags = FALSE to keep the previous
manual flags.