read.nrrd: Read nrrd file into an array in memory

Description Usage Arguments Details Value See Also

View source: R/nrrd-io.R

Description

Read nrrd file into an array in memory

Read the (text) header of a NRRD format file

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
read.nrrd(
  file,
  origin = NULL,
  ReadData = TRUE,
  AttachFullHeader = TRUE,
  Verbose = FALSE,
  ReadByteAsRaw = c("unsigned", "all", "none")
)

read.nrrd.header(file, Verbose = FALSE)

Arguments

file

Path to a nrrd (or a connection for read.nrrd.header)

origin

Add a user specified origin (x,y,z) to the returned object

ReadData

When FALSE just return attributes (i.e. the nrrd header)

AttachFullHeader

Include the full nrrd header as an attribute of the returned object (default TRUE)

Verbose

Status messages while reading

ReadByteAsRaw

Either a character vector or a logical vector specifying when R should read 8 bit data as an R raw vector rather than integer vector.

Details

read.nrrd reads data into a raw array. If you wish to generate a im3d object that includes spatial calibration (but is limited to representing 3D data) then you should use read.im3d.

ReadByteAsRaw=unsigned (the default) only reads unsigned byte data as a raw array. This saves quite a bit of space and still allows data to be used for logical indexing.

Value

An array object, optionally with attributes from the nrrd header.

A list with elements for the key nrrd header fields

See Also

write.nrrd, read.im3d


nat documentation built on Sept. 6, 2021, 5:09 p.m.