runFSLCommand: Wrapper for running an fsl command safely within R

View source: R/runFSLCommand.R

runFSLCommandR Documentation

Wrapper for running an fsl command safely within R

Description

Wrapper for running an fsl command safely within R

Usage

runFSLCommand(args, fsldir = NULL, stdout = NULL, stderr = NULL, echo = TRUE)

Arguments

args

FSL command string to be run

fsldir

Location of FSL installation. If NULL, the function

stdout

File target for redirecting stdout. If NULL, stdout will not be captured

stderr

File target for redirecting stderr. If NULL, stderr will not be captured

echo

Whether to print FSL command to the screen

Details

This command ensures that $FSLDIR/bin is in the PATH and sources $FSLDIR/etc/fslconf/fsl.sh

I should probably just use the fslr package, but didn't know about it prior to writing this...

Value

The exit status of the executed FSL command. 0 for success, non-zero for failure

Author(s)

Michael Hallquist

Examples


## Not run: 
runFSLCommand("fslmaths inp_nif -mul 10 -abs -thr 15 manip_out")

## End(Not run)

PennStateDEPENdLab/dependlab documentation built on April 10, 2024, 5:15 p.m.