ViewImage: Interactive display of image

Description Usage Arguments Details Value Examples

Description

Prompts R's graphic display window to open, this device supports single and multi-frame images as well as different degrees of zoom, making it easy to visualize detailed microscopy data.

Usage

1
viewImage(image_obj, color_mode = c(0, 2), image_title = NULL)

Arguments

image_obj

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

color_mode

A numeric string containing the color mode of the image which can be either 0 for Grayscale or 2 for Color. *Note it does not change the pixel values of the image, only how R Graphics displays it. If missing, default to Grayscale.

image_title

A character string specifying the title of the display image.

Details

Alternatively use plot(image) command to make a simple graph of the first frame.

Value

ViewImage does not return, it displays an image object processed by LoadImage using R graphics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#Example 1
#display a sample tiff distributed with the package
#for tiff images with multiple channels, click to scroll through the frames
library(MyoManager)
mouse <- loadImage(system.file('extdata/Mouse_01.tiff', package='MyoManager'))
viewImage(mouse, 2)

#Example 2
#display a sample jpeg from source link
library(MyoManager)
rabbit <- loadImage("https://user-images.githubusercontent.com/60583839/141215629-f19d4a77-c5f0-491f-9262-b22cd59739e3.jpg")
viewImage(rabbit, 0)

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