readStaticInterfileIMG: Read interfile binary file format images

Description Usage Arguments Value Examples

Description

This function imports static (2D) binary interfile files.

Usage

1
2
readStaticInterfileIMG(fname, endian = "little", file.row = 80,
  file.col = 80, what = "double", bytes.per.pixel = 4)

Arguments

fname

Filename of the interfile

endian

Endian-ness of the file you are attempting to read. Permitted values are "big" or "little"

file.row

Rows of pixels in the image

file.col

Columns of pixels in the image

what

Type of binary data stored: permitted values are "numeric", "double", "integer", "int", "logical", "complex", "character", "raw".

bytes.per.pixel

Number of bytes per pixel. This information shold be stored in the header file (.hdr) of the interfile.

Value

A matrix of pixel intensities

Examples

1
2
3
4
5
6
7
8
9
# Load an example interfile (Rabbit aorta, Tc99m scan)
interfile.location <- system.file("extdata", "Tc99m_20percent_energy.img", package = "interfile")

# Read the binary interfile
my_scan <- readStaticInterfileIMG(interfile.location)

# Check out the results (returned as a matrix)
dim(my_scan)
head(my_scan)

kippjohnson/interfile documentation built on May 20, 2019, 2:59 p.m.