DisplayGallery {IFC} | R Documentation |
Gallery Display
Description
Displays gallery of 'IFC_img' / 'IFC_msk' objects
Usage
DisplayGallery(
...,
objects,
offsets,
image_type = "img",
layout,
name = "DisplayGallery",
caption = FALSE,
pageLength = 10L,
pdf_pageSize = "A2",
pdf_pageOrientation = "landscape",
pdf_image_dpi = 96,
extract_max = 10,
sampling = FALSE,
display_progress = TRUE,
mode = c("rgb", "gray")[1]
)
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. |
name |
id of the datatable container. Default is DisplayGallery. |
caption |
whether to display caption name or not. Default is FALSE. |
pageLength |
integer, number of objects to display per page. Default is 10. |
pdf_pageSize |
string, page dimension when exporting to pdf. Default is "A2". |
pdf_pageOrientation |
string, page orientation when exporting to pdf. Default is "landscape". Allowed are "landscape" or "portrait". |
pdf_image_dpi |
integer, desired image resolution. Default is 96, for full resolution. |
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. |
mode |
( |
Details
arguments of objectExtract
will be deduced from DisplayGallery
input arguments.
Please note that PDF export link will be available if 'write_to' will not result in a "bmp".
Please note that exporting to "tiff" may depend on browser capabilities.
Please note that a warning may be sent if gallery to display contains large amount of data. This is due to use of datatable() from DT.
Warning message:
In instance$preRenderHook(instance) :
It seems your data is too big for client-side DataTables. You may consider server-side processing: http://rstudio.github.io/DT/server.html
For these reasons, it may be better to use "png" extension to display images.
Value
it invisibly returns a list whose members are:
-data, data for DT::datatable(),
-args, associated arguments to pass to DT::datatable().
Examples
if(requireNamespace("IFCdata", quietly = TRUE)) {
## use a cif file
file_cif <- system.file("extdata", "example.cif", package = "IFCdata")
cif <- ExtractFromXIF(fileName = file_cif)
info <- getInfo(fileName = file_cif, from = "analysis")
## randomly show at most 10 "img" objects from file
DisplayGallery(info = info, image_type = "img", extract_max = 10,
sampling = TRUE, write_to = "example.bmp")
} else {
message(sprintf('Please run `install.packages("IFCdata", repos = "%s", type = "source")` %s',
'https://gitdemont.github.io/IFCdata/',
'to install extra files required to run this example.'))
}