Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

checkniigz-methods

Force object to filename with .nii.gz extension


Description

Ensures the output to be a character filename (or vector) from an input image or nifti, to be gzipped and has .nii.gz extension

Usage

checkniigz(file, ...)

## S4 method for signature 'nifti'
checkniigz(file, ...)

## S4 method for signature 'ANY'
checkniigz(file, ...)

## S4 method for signature 'factor'
checkniigz(file, ...)

## S4 method for signature 'character'
checkniigz(file, ...)

## S4 method for signature 'list'
checkniigz(file, ...)

ensure_nii_gz(file, ...)

Arguments

file

character or nifti object

...

options passed to checkimg

Value

Character filename of image or temporary nii, with .nii.gz extension

Author(s)

John Muschelli muschellij2@gmail.com

Examples

set.seed(5)
dims = rep(10, 3)
arr = array(rnorm(prod(dims)), dim = dims)
arr[,,10] = 0
nim = oro.nifti::nifti(arr)
rnifti = RNifti::asNifti(nim)
timg = tempimg(nim)
limg = list(factor(timg), factor(timg))
func = checkniigz
func(nim)
func(rnifti)
func(timg)
func(limg)

neurobase

'Neuroconductor' Base Package with Helper Functions for 'nifti' Objects

v1.32.1
GPL-2
Authors
John Muschelli [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.