fsl.wrappers.fslmaths

This module provides the fslmaths class, which acts as a wrapper for the fslmaths command-line tool.

class fsl.wrappers.fslmaths.fslmaths(input)[source]

Bases: object

Perform mathematical manipulation of images.

__init__(input)[source]

Constructor.

abs()[source]

Absolute value.

bin()[source]

Use (current image>0) to binarise.

binv()[source]

Binarise and invert (binarisation and logical inversion).

recip()[source]

Reciprocal (1/current image).

Tmean()[source]

Mean across time.

Tstd()[source]

Standard deviation across time.

Tmin()[source]

Min across time.

Tmax()[source]

Max across time.

fillh()[source]

fill holes in a binary mask (holes are internal - i.e. do not touch the edge of the FOV).

ero(repeat=1)[source]

Erode by zeroing non-zero voxels when zero voxels in kernel.

dilM(repeat=1)[source]

Mean Dilation of non-zero voxels.

dilF(repeat=1)[source]

Maximum filtering of all voxels.

add(image)[source]

Add input to current image.

sub(image)[source]

Subtract image from current image.

mul(image)[source]

Multiply current image by image.

div(image)[source]

Divide current image by image.

mas(image)[source]

Use image (>0) to mask current image.

rem(image)[source]

Divide current image by following image and take remainder.

thr(image)[source]

use image number to threshold current image (zero < image).

uthr(image)[source]

use image number to upper-threshold current image (zero anything above the number).

inm(image)[source]

Intensity normalisation (per 3D volume mean)

bptf(hp_sigma, lp_sigma)[source]

Bandpass temporal filtering; nonlinear highpass and Gaussian linear lowpass (with sigmas in volumes, not seconds); set either sigma<0 to skip that filter.

run(output=None)[source]

Save output of operations to image.

__dict__ = mappingproxy({'__module__': 'fsl.wrappers.fslmaths', '__doc__': 'Perform mathematical manipulation of images.', '__init__': <function fslmaths.__init__>, 'abs': <function fslmaths.abs>, 'bin': <function fslmaths.bin>, 'binv': <function fslmaths.binv>, 'recip': <function fslmaths.recip>, 'Tmean': <function fslmaths.Tmean>, 'Tstd': <function fslmaths.Tstd>, 'Tmin': <function fslmaths.Tmin>, 'Tmax': <function fslmaths.Tmax>, 'fillh': <function fslmaths.fillh>, 'ero': <function fslmaths.ero>, 'dilM': <function fslmaths.dilM>, 'dilF': <function fslmaths.dilF>, 'add': <function fslmaths.add>, 'sub': <function fslmaths.sub>, 'mul': <function fslmaths.mul>, 'div': <function fslmaths.div>, 'mas': <function fslmaths.mas>, 'rem': <function fslmaths.rem>, 'thr': <function fslmaths.thr>, 'uthr': <function fslmaths.uthr>, 'inm': <function fslmaths.inm>, 'bptf': <function fslmaths.bptf>, 'run': <function fslmaths.run>, '_fslmaths__run': <function fslmaths.__run>, '__dict__': <attribute '__dict__' of 'fslmaths' objects>, '__weakref__': <attribute '__weakref__' of 'fslmaths' objects>})
__module__ = 'fsl.wrappers.fslmaths'
__weakref__

list of weak references to the object (if defined)

_fslmaths__run(*cmd)

Run the given fslmaths command.