init.nii: Initialize Empty NIFTI File

Description Usage Arguments Author(s)

Description

This function is used to initialize an empty NIFTI file. It creates the file volume-by-volume rather than a bulk array write operation such that massive arrays do not need to be loaded into memory

Usage

1
init.nii(file.name, dims, pixdim=NULL, orient=NULL)

Arguments

file.name

Full file path for the file to be written, must have .nii extension

dims

a numeric vector specifying the image dimensions, e.g., c(X,Y,Z,T)

pixdim

An 8 element numeric vector specifying the pixel dimensions image to be created. Should be in the format (a,x,y,z,t,b,c,d), the output from unlist(nii.hdr("example_file.nii", "pixdim")) is the correct format

orient

A named list with the following elements, qform_code [integer(1)], sform_code [integer(1)], quatern_b [numeric(1)], quatern_c [numeric(1)], quatern_d [numeric(1)], qoffset_x [numeric(1)], qoffset_y [numeric(1)], qoffset_z [numeric(1)], srow_x [numeric(3)], srow_y [numeric(3)], srow_z [numeric(3)]

Author(s)

Timothy R. Koscik <[email protected]>


TKoscik/tk.nifti documentation built on May 17, 2019, 6:34 p.m.