asDiffusionScheme: Create a DiffusionScheme object from data

asDiffusionSchemeR Documentation

Create a DiffusionScheme object from data

Description

This is a generic function that converts another object to a DiffusionScheme by extracting the relevant information. There are methods for matrices (of gradient directions) and MriImage objects. An image passed as an argument to the latter must have the bValues and bVectors tags set appropriately.

Usage

asDiffusionScheme(x, ...)

## S3 method for class 'matrix'
asDiffusionScheme(x, bValues, ...)

## S3 method for class 'MriImage'
asDiffusionScheme(x, ...)

## S3 method for class 'DiffusionScheme'
asDiffusionScheme(x, ...)

Arguments

x

An object to coerce to a DiffusionScheme.

...

Additional arguments to methods.

bValues

A vector of b-values, required when x is a matrix of gradient directions.

Value

A DiffusionScheme object.

Author(s)

Jon Clayden

References

Please cite the following reference when using TractoR in your work:

J.D. Clayden, S. Muñoz Maniega, A.J. Storkey, M.D. King, M.E. Bastin & C.A. Clark (2011). TractoR: Magnetic resonance imaging and tractography with R. Journal of Statistical Software 44(8):1-18. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v044.i08")}.


tractor.base documentation built on Nov. 5, 2025, 6:18 p.m.