diff --git a/nipype/algorithms/confounds.py b/nipype/algorithms/confounds.py index 0349afdc23..050d1d18be 100644 --- a/nipype/algorithms/confounds.py +++ b/nipype/algorithms/confounds.py @@ -233,6 +233,7 @@ class FramewiseDisplacementInputSpec(BaseInterfaceInputSpec): "SPM", "FSFAST", "NIPY", + "4DFP", desc="Source of movement parameters", mandatory=True) radius = traits.Float( diff --git a/nipype/algorithms/modelgen.py b/nipype/algorithms/modelgen.py index 75abd8410b..42f1c0eadf 100644 --- a/nipype/algorithms/modelgen.py +++ b/nipype/algorithms/modelgen.py @@ -201,6 +201,7 @@ class SpecifyModelInputSpec(BaseInterfaceInputSpec): "AFNI", "FSFAST", "NIPY", + "4DFP", usedefault=True, desc="Source of motion parameters") outlier_files = InputMultiPath( diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index d412493714..066d93af37 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -37,7 +37,7 @@ def _get_affine_matrix(params, source): params : np.array (upto 12 long) in native package format source : the package that generated the parameters - supports SPM, AFNI, FSFAST, FSL, NIPY + supports SPM, AFNI, FSFAST, FSL, NIPY, 4DFP """ if source == 'NIPY': # nipy does not store typical euler angles, use nipy to convert @@ -173,6 +173,7 @@ class ArtifactDetectInputSpec(BaseInterfaceInputSpec): "AFNI", "NiPy", "FSFAST", + "4DFP", desc="Source of movement parameters", mandatory=True) use_differences = traits.ListBool( diff --git a/nipype/utils/misc.py b/nipype/utils/misc.py index 61730025ff..118a6e8809 100644 --- a/nipype/utils/misc.py +++ b/nipype/utils/misc.py @@ -283,6 +283,9 @@ def normalize_mc_params(params, source): elif source.upper() in ('AFNI', 'FSFAST'): params = params[np.asarray([4, 5, 3, 1, 2, 0]) + (len(params) > 6)] params[3:] = params[3:] * np.pi / 180. + elif source.upper() == '4DFP': + params = params[np.arange(1, 7)] + params[3:] = params[3:] * np.pi / 180. elif source.upper() == 'NIPY': from nipy.algorithms.registration import to_matrix44, aff2euler matrix = to_matrix44(params)