Learn R Programming

FIACH (version 0.1.2)

sepConvolve3d: Fast 3d Convolution

Description

This function convolves data in three different directions with potentially different impulses.

Usage

sepConvolve3d(x,kernX, kernY, kernZ)

Arguments

x
A 3D/4D array. If a 4D array then each 3d array along the fourth dimension is convolved.
kernX
filter kernel to be used in the x direction
kernY
filter kernel to be used in the y direction
kernZ
filter kernel to be used in the z direction

Value

returns the convolved array

Examples

Run this code
func<-readNii(system.file("extdata","motion_ex.nii.gz",package="FIACH"))

kernx<-gaussKernel(8,21,3.33)
kerny<-gaussKernel(8,21,3.33)
kernz<-gaussKernel(8,21,4)

smooth<-sepConvolve3d(func,kernx,kerny,kernz)

Run the code above in your browser using DataLab