Commit 75ed6335 authored by Evan Edmond's avatar Evan Edmond Committed by Paul McCarthy
Browse files

ENH: add fslmaths simple smoothing

parent 990f1d94
......@@ -105,6 +105,11 @@ class fslmaths(object):
return self
def smooth(self, sigma):
"""Spatial smoothing - mean filtering using a gauss kernel of sigma mm"""
self.__args.extend(("-s", sigma))
return self
def add(self, image):
"""Add input to current image."""
self.__args.extend(("-add", image))
......@@ -290,14 +290,15 @@ def test_fslmaths():
.abs().bin().binv().recip().Tmean().Tstd().Tmin().Tmax() \
.fillh().ero().dilM().dilF().add('addim').sub('subim') \
.mul('mulim').div('divim').mas('masim').rem('remim') \
.thr('thrim').uthr('uthrim').inm('inmim').bptf(1, 10).run('output')
.thr('thrim').uthr('uthrim').inm('inmim').bptf(1, 10) \
expected = [cmd, 'input',
'-abs', '-bin', '-binv', '-recip', '-Tmean', '-Tstd',
'-Tmin', '-Tmax', '-fillh', '-ero', '-dilM', '-dilF',
'-add addim', '-sub subim', '-mul mulim', '-div divim',
'-mas masim', '-rem remim', '-thr thrim', '-uthr uthrim',
'-inm inmim', '-bptf 1 10', 'output']
'-inm inmim', '-bptf 1 10', '-s 6', 'output']
expected = ' '.join(expected)
assert result.stdout[0] == expected
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment