ExportToNumpy {IFC} | R Documentation |
Numpy Export
Description
Exports IFC objects to numpy array [objects,height,width,channels]
Usage
ExportToNumpy(
...,
objects,
offsets,
image_type = "img",
size = c(64, 64),
force_width = FALSE,
display_progress = TRUE,
python = Sys.getenv("RETICULATE_PYTHON"),
dtype = c("uint8", "int16", "uint16", "double")[3],
mode = c("raw", "gray")[1],
export = c("file", "matrix")[2],
write_to,
overwrite = FALSE
)
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 |
type of desired object offsets. Either |
size |
a length 2 integer vector of final dimensions of the image, height 1st and width 2nd. Default is |
force_width |
whether to use information in |
display_progress |
whether to display a progress bar. Default is |
python |
path to python. Default is |
dtype |
desired arrays data-type. Default is |
mode |
( |
export |
export format. Either |
write_to |
used when |
overwrite |
whether to overwrite file or not. Default is |
Details
Please note that 'size'
parameter has to be supplied and could not be set to (0,) when 'object'
length is not equal to one
ExportToNumpy
requires reticulate
package, python
and numpy
installed to create ".npy"
file.
If one of these is missing, 'export'
will be set to "matrix"
.
If 'param'
is provided in '...'
, param$export <- "matrix"
, param$mode <- 'mode'
and param$size <- 'size'
and will be overwritten.
Value
Depending on 'export'
:
-"matrix"
, an array whose dimensions are [object, height, width, channel].
-"file"
, it invisibly returns path of ".npy"
exported file.
Note
Arguments of objectExtract
will be deduced from ExportToNumpy
input arguments.