Skip to content
Snippets Groups Projects
Commit 7a35332c authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

MNT: Remove bedpostx_postproc, and deprecate bedpostx_postproc_gpu, as they're

not intended to be called directly. Add bedpostx[_gpu] wrapper functions
parent 16ea1af2
No related branches found
No related tags found
No related merge requests found
...@@ -165,8 +165,9 @@ from fsl.wrappers.fdt import (dtifit, ...@@ -165,8 +165,9 @@ from fsl.wrappers.fdt import (dtifit,
from fsl.wrappers.bedpostx import (xfibres, from fsl.wrappers.bedpostx import (xfibres,
xfibres_gpu, xfibres_gpu,
split_parts_gpu, split_parts_gpu,
bedpostx,
bedpostx_gpu,
bedpostx_postproc_gpu, bedpostx_postproc_gpu,
bedpostx_postproc,
probtrackx, probtrackx,
probtrackx2, probtrackx2,
probtrackx2_gpu) probtrackx2_gpu)
......
...@@ -14,14 +14,14 @@ commands. ...@@ -14,14 +14,14 @@ commands.
xfibres xfibres
xfibres_gpu xfibres_gpu
split_parts_gpu split_parts_gpu
bedpostx_postproc bedpostx
bedpostx_postproc_gpu bedpostx_gpu
probtrackx probtrackx
probtrackx2 probtrackx2
probtrackx2_gpu probtrackx2_gpu
""" """
import fsl.utils.deprecated as deprecated
import fsl.utils.assertions as asrt import fsl.utils.assertions as asrt
from . import wrapperutils as wutils from . import wrapperutils as wutils
...@@ -78,36 +78,50 @@ by the corresponding wrapper functions. ...@@ -78,36 +78,50 @@ by the corresponding wrapper functions.
""" """
@wutils.fileOrImage('data_dir')
@wutils.fslwrapper @wutils.fslwrapper
def bedpostx(data_dir, **kwargs): def bedpostx(data_dir, **kwargs):
"""Wrapper for the ``bedpostx`` command.""" """Wrapper for the ``bedpostx`` command."""
asrt.assertFileExists(data_dir) cmd = ['bedpostx', data_dir]
cmd = ['bedpostx',
data_dir]
# Uses same VALMAP as xfibres # Uses same VALMAP as xfibres
cmd += wutils.applyArgStyle('--=', valmap=XFIBRES_VALMAP, **kwargs) cmd += wutils.applyArgStyle('--=', valmap=XFIBRES_VALMAP, **kwargs)
return cmd return cmd
@wutils.fileOrImage('data_dir')
@wutils.fslwrapper @wutils.fslwrapper
def bedpostx_gpu(data_dir, **kwargs): def bedpostx_gpu(data_dir, **kwargs):
"""Wrapper for the ``bedpostx_gpu`` command.""" """Wrapper for the ``bedpostx_gpu`` command."""
asrt.assertFileExists(data_dir) cmd = ['bedpostx_gpu', data_dir]
cmd = ['bedpostx_gpu',
data_dir]
# Uses same VALMAP as xfibres # Uses same VALMAP as xfibres
cmd += wutils.applyArgStyle('--=', valmap=XFIBRES_VALMAP, **kwargs) cmd += wutils.applyArgStyle('--=', valmap=XFIBRES_VALMAP, **kwargs)
return cmd return cmd
@wutils.fileOrImage('data', 'mask',)
@wutils.fileOrArray('bvecs', 'bvals')
@wutils.fslwrapper
@deprecated.deprecated('3.19.0', '4.0.0', 'Use bedpostx_gpu directly')
def bedpostx_postproc_gpu(data, mask, bvecs, bvals, TotalNumVoxels,
TotalNumParts, SubjectDir, bindir, **kwargs):
"""Wrapper for the ``bedpostx_postproc_gpu`` command."""
asrt.assertFileExists(data, bvecs, bvals)
asrt.assertIsNifti(mask)
cmd = ['bedpostx_postproc_gpu.sh',
'--data=' + data,
'--mask=' + mask,
'--bvecs=' + bvecs,
'--bvals=' + bvals]
cmd += wutils.applyArgStyle('--=', valmap=XFIBRES_VALMAP, **kwargs)
cmd += [str(TotalNumVoxels), str(TotalNumParts), SubjectDir, bindir]
return cmd
@wutils.fileOrImage('data', 'mask',) @wutils.fileOrImage('data', 'mask',)
@wutils.fileOrArray('bvecs', 'bvals') @wutils.fileOrArray('bvecs', 'bvals')
@wutils.fslwrapper @wutils.fslwrapper
...@@ -170,48 +184,6 @@ def split_parts_gpu(Datafile, Maskfile, Bvalsfile, Bvecsfile, TotalNumParts, ...@@ -170,48 +184,6 @@ def split_parts_gpu(Datafile, Maskfile, Bvalsfile, Bvecsfile, TotalNumParts,
return cmd return cmd
@wutils.fileOrImage('data', 'mask',)
@wutils.fileOrArray('bvecs', 'bvals')
@wutils.fslwrapper
def bedpostx_postproc_gpu(data, mask, bvecs, bvals, TotalNumVoxels,
TotalNumParts, SubjectDir, bindir, **kwargs):
"""Wrapper for the ``bedpostx_postproc_gpu`` command."""
asrt.assertFileExists(data, bvecs, bvals)
asrt.assertIsNifti(mask)
cmd = ['bedpostx_postproc_gpu.sh',
'--data=' + data,
'--mask=' + mask,
'--bvecs=' + bvecs,
'--bvals=' + bvals]
cmd += wutils.applyArgStyle('--=', valmap=XFIBRES_VALMAP, **kwargs)
cmd += [str(TotalNumVoxels), str(TotalNumParts), SubjectDir, bindir]
return cmd
@wutils.fileOrImage('data', 'mask',)
@wutils.fileOrArray('bvecs', 'bvals')
@wutils.fslwrapper
def bedpostx_postproc(data, mask, bvecs, bvals, TotalNumVoxels,
TotalNumParts, SubjectDir, bindir, **kwargs):
"""Wrapper for the ``bedpostx_postproc`` command."""
asrt.assertFileExists(data, bvecs, bvals)
asrt.assertIsNifti(mask)
cmd = ['bedpostx_postproc.sh',
data,
mask,
bvecs,
bvals]
cmd += wutils.applyArgStyle('--=', valmap=XFIBRES_VALMAP, **kwargs)
cmd += [str(TotalNumVoxels), str(TotalNumParts), SubjectDir, bindir]
return cmd
@wutils.fileOrImage('mask', 'seed') @wutils.fileOrImage('mask', 'seed')
@wutils.fslwrapper @wutils.fslwrapper
def probtrackx(samples, mask, seed, **kwargs): def probtrackx(samples, mask, seed, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment