Learn R Programming

rayimage (version 0.15.1)

handle_image_output: Handle Image Output

Description

Handles image output logic: returning, saving to a file, or previewing.

Usage

handle_image_output(image, filename = NULL, preview = FALSE)

Value

If filename = NULL and preview = FALSE, returns the image array invisibly. Otherwise, saves to file or displays the image.

Arguments

image

3D array. The image data.

filename

Default NULL. String specifying the file path to save the image. If NULL, the image is returned or displayed.

preview

Default FALSE. If TRUE, the image is displayed.