LoadImage: Loading images

Description Usage Arguments Details Value References Examples

Description

The following function is a wrap around image_read and as_EBImage to load one or more images from files.

Usage

1
loadImage(image_path)

Arguments

image_path

A character vector of one or more paths or URLs to image files

Details

Magick can handle for a variety of image formats (over 200), EBImage has a superior display quality but only supports the three common image formats jpg, png, and tiff. Hence by loading images with Magick and converting them to EBImage objects for display, we can avoid unsupported image types while maximizing display functionalities.

Value

An object of Image class specific to EBImage, stored as multi- dimensional arrays containing the pixel intensities.

References

Jeroen Ooms (2021). magick: Advanced Graphics and Image-Processing in R. R package version 2.7.3. link

Gregoire Pau, Florian Fuchs, Oleg Sklyar, Michael Boutros, and Wolfgang Huber (2010): EBImage - an R package for image processing with applications to cellular phenotypes. Bioinformatics, 26(7), pp. 979-981, link (https://bioconductor.org/packages/release/bioc/html/EBImage.html

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Example 1
#load sample tiff distributed with the package
library(MyoManager)
image <- loadImage(system.file('extdata/Human_01.tiff', package = 'MyoManager'))


# Example 2
#load sample jpeg from public link
library(MyoManager)
image <- loadImage("https://user-images.githubusercontent.com/60583839/141215629-f19d4a77-c5f0-491f-9262-b22cd59739e3.jpg")

karenkuang37/MyoManager documentation built on Dec. 21, 2021, 5:18 a.m.