MRIaggr-writeMRIaggr: Write an image file

Description Usage Arguments Details Value Examples

Description

Write an image file from a MRIaggr object.

Usage

1
2
3
4
5
## S4 method for signature 'MRIaggr'
writeMRIaggr(object, param, num = NULL, 
         norm_mu = FALSE, norm_sigma = FALSE, range.coords = NULL, 
		 default_value = NA, filename, format, gzipped = TRUE,
         verbose = optionsMRIaggr("verbose"), size = "NA_integer_")

Arguments

object

an object of class MRIaggr. REQUIRED.

param

the contrast parameters to extract. character vector or NULL. REQUIRED.

num

the slices to extract. numeric vector or NULL.

norm_mu

the type of centering to apply on the parameter values. character. See the details section.

norm_sigma

the type of scaling to apply on the parameter values. character. See the details section.

default_value

the element used to fill the missing observations. numeric.

range.coords

the maximum coordinate in each dimension to be considered. numeric vector of length 3.

filename

the name of the image file. character. REQUIRED.

format

the format of the image file. Can be "raw.gz", "analyze", "nifti" or "dicom". REQUIRED.

size

the number of bytes per element in the byte stream. integer. See the documentation of the writeBin function for more details.

gzipped

is a character string that enables exportation of compressed (.gz) files.

verbose

is a logical variable that allows text-based feedback during execution of the function.

Details

This function requires to have installed the oro.nifti package to work if argument format is set to "analyze" or "nifti".

Value

None.

Examples

1
2
3
4
5
6
7
8
9
 
data("MRIaggr.Pat1_red", package = "MRIaggr")

## Not run: 
writeMRIaggr(MRIaggr.Pat1_red, param = "DWI_t0", filename = "Pat1_DWIred", format = "nifti")
DWIred <- readMRI("Pat1_DWIred", format = "nifti")
image(DWIred[,,1])

## End(Not run)

bozenne/MRIaggr documentation built on May 13, 2019, 1:39 a.m.