Function to shortcut extraction, normalization and eventually colorization of images to matrix ! excludes mask.
ExtractImages_toFile(
...,
objects,
offsets,
display_progress = TRUE,
mode = c("rgb", "gray")[1],
write_to
)
arguments to be passed to objectExtract
with the exception of 'ifd' and 'bypass'(=TRUE).
If 'param' is provided 'export'(="file"), 'write_to' and 'mode' will be overwritten.
If 'offsets' are not provided extra arguments can also be passed with ... getOffsets
.
/!\ If not any of 'fileName', 'info' and 'param' can be found in ... then attr(offsets, "fileName_image") will be used as 'fileName' input parameter to pass to objectParam
.
integer vector, IDEAS objects ids numbers to use. This argument is not mandatory, if missing, the default, all objects will be used.
object of class `IFC_offset`. This argument is not mandatory but it may allow to save time for repeated image export on same file.
whether to display a progress bar. Default is TRUE.
(objectParam
argument) color mode export. Either "rgb", "gray" . Default is "rgb".
(objectParam
argument) used to compute exported file name.
Exported "file" extension will be deduced from this pattern. Allowed export are '.bmp', '.jpg', '.jpeg', '.png', '.tif', '.tiff'.
Note that '.bmp' are faster but not compressed producing bigger data.
Placeholders, if found, will be substituted:
-%d: with full path directory
-%p: with first parent directory
-%e: with extension (without leading .)
-%s: with shortname (i.e. basename without extension)
-%o: with object_id
-%c: with channel_id
A good trick is to use "%d/%s/%s_%o_%c.tiff".
It invisibly returns a list of exported file path of corresponding to objects extracted.
arguments of objectExtract
will be deduced from ExtractImages_toFile
input arguments.