ExportToGallery {IFC} | R Documentation |
Gallery Export
Description
Exports gallery of 'IFC_img' / 'IFC_msk' objects
Usage
ExportToGallery(
...,
objects,
offsets,
image_type = "img",
layout,
export = c("file", "matrix", "base64")[2],
write_to,
base64_id = FALSE,
base64_att = "",
overwrite = FALSE,
main = "",
add_channels = TRUE,
add_ids = 1,
add_lines = 2,
bg_color = "grey20",
dpi = 300,
scale = list(),
extract_max = 10,
sampling = FALSE,
display_progress = TRUE
)
Arguments
... |
arguments to be passed to |
objects |
integer vector, IDEAS objects ids numbers to use. This argument is not mandatory, if missing, the default, all objects will be used. |
offsets |
object of class 'IFC_offset'. This argument is not mandatory but it may allow to save time for repeated image export on same file. |
image_type |
image_type of desired offsets. Either "img" or "msk". Default is "img". |
layout |
a character vector of [acquired channels + 'composite' images] members to export. Default is missing to export everything. Note that members can be missing to be removed from final gallery export. Note that members not found will be automatically removed and a warning will be thrown. |
export |
export format. Either "file", "matrix", "base64". Default is "matrix". |
write_to |
used when 'export' is "file" or "base64" to compute respectively filename or base64 id attribute.
Exported type 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. |
base64_id |
whether to add id attribute to base64 exported object. Default is TRUE. |
base64_att |
attributes to add to base64 exported object. Default is "". |
overwrite |
whether to overwrite file or not. Default is FALSE. |
main |
main title that will be displayed on top center of the image. If too large it will be clipped. |
add_channels |
whether to add channels names. Default is TRUE. |
add_ids |
integer, indice of column to mark objects ids number. Default is 1. If add_ids < 1, no ids are added. |
add_lines |
integer, size of separating lines between objects. Default is 1. If add_lines < 1, no separating lines are added. |
bg_color |
background color for main, channels and separating lines. Default is "grey20". |
dpi |
integer, the resolution of the image in DPI (dots per inch). Default is 300. |
scale |
a named list whose members are 'size', 'style', 'color', 'xoff', 'yoff'. Default is list() to draw no scale. Otherwise, |
extract_max |
maximum number of objects to extract. Default is 10. Use +Inf to extract all. |
sampling |
whether to sample objects or not. Default is FALSE. |
display_progress |
whether to display a progress bar. Default is TRUE. |
Details
arguments of objectExtract
will be deduced from ExportToGallery
input arguments.
TRICK: for exporting only ONE 'objects', set 'add_channels' = FALSE, 'add_ids' >= 1, 'force_width' = FALSE, 'dpi' = 96; this allows generating image with its original size incrusted with its id number.
Value
Depending on 'export':
-"matrix", a rgb array,
-"base64", a data-uri string,
-"file", an invisible vector of ids corresponding to the objects exported.