mockFile: Generate Test Images

View source: R/mockFile.R

mockFileR Documentation

Generate Test Images

Description

Create a mock image of specific parameters for testing.

Usage

mockFile(name = "mockfile", ...)

Arguments

name

File name.

...

File parameters; available parameters are listed below.

Details

Generates mock files of specific size or pixel type containing gradient images. The desired parameters can be provided as key value pairs to the mockFile function. For a list of available parameters see below.

Value

A character string.

Parameters

Name Default Description
sizeX 512 horizontal size in pixels
sizeY 512 vertical size in pixels
sizeZ 1 number of Z sections
sizeC 1 number of channels
sizeT 1 number of time points
pixelType uint8 string specifying pixel type: int8, uint8, int16, uint16, int32, uint32, float, double
bitsPerPixel 0 number of valid bits (<= number of bits implied by pixel type)
rgb 1 number of channels that are merged together
dimOrder XYZCT string describing dimension order
orderCertain true
little true whether or not the pixel data should be little-endian
interleaved true whether or not merged channels are interleaved
indexed false whether or not a color lookup table is present
falseColor false whether or not the color lookup table is just for making the image look pretty
series 1 number of series (Images)
lutLength 3 number of entries in the color lookup table

Author(s)

Andrzej OleÅ› <andrzej.oles@gmail.com>, 2014-2023

Examples

f = mockFile(sizeX = 256, sizeY = 256)
img = read.image(f)
img

aoles/RBioFormats documentation built on May 3, 2024, 7:46 a.m.