cal_img: Set Minimum/Maximum Values for NIfTI data

View source: R/cal_img.R

calibrateImageR Documentation

Set Minimum/Maximum Values for NIfTI data

Description

Rescales image cal_max and cal_min slots to be the max and min, respectively, of an object of class nifti, with na.rm = TRUE. This is so that when images are rendered/written, the values correspond to those in the array (stored in .Data slot) are plotted on correct greyscale and no error is given by writeNIfTI.

Usage

calibrateImage(img, infok = TRUE)

cal_img(img, infok = TRUE)

Arguments

img

is a nifti object.

infok

is a logical value whether or not Inf and -Inf are acceptable (default = TRUE). If FALSE and max or min is infinity, then cal_min or cal_max is set to infinity (negative or positive), respectively.

Value

An object of class nifti.

Author(s)

John Muschelli muschellij2@gmail.com


oro.nifti documentation built on Aug. 10, 2022, 5:09 p.m.

Related to cal_img in oro.nifti...