diff --git a/pydra/tasks/fsl/utils/extractroi.py b/pydra/tasks/fsl/utils/extractroi.py index da34f08..ac37cc4 100644 --- a/pydra/tasks/fsl/utils/extractroi.py +++ b/pydra/tasks/fsl/utils/extractroi.py @@ -20,7 +20,7 @@ "help_string": "output file", "argstr": "{roi_file}", "position": 1, - "output_file_template": "{in_file}_trim", + "output_file_template": "{in_file}_roi", }, ), ("x_min", int, {"help_string": "", "argstr": "{x_min}", "position": 2}), @@ -48,9 +48,9 @@ class ExtractROI(ShellCommandTask): >>> task.inputs.in_file = "test.nii.gz" >>> task.inputs.t_min = 0 >>> task.inputs.t_size = 3 - >>> task.inputs.roi_file = "test_trim.nii.gz" + >>> task.inputs.roi_file = "test_roi.nii.gz" >>> task.cmdline - 'fslroi test.nii.gz test_trim.nii.gz 0 3' + 'fslroi test.nii.gz test_roi.nii.gz 0 3' """ input_spec = ExtractROI_input_spec diff --git a/pydra/tasks/fsl/utils/tests/test_run_extractroi.py b/pydra/tasks/fsl/utils/tests/test_run_extractroi.py index e3bddd8..d4c0778 100644 --- a/pydra/tasks/fsl/utils/tests/test_run_extractroi.py +++ b/pydra/tasks/fsl/utils/tests/test_run_extractroi.py @@ -6,7 +6,21 @@ @pytest.mark.xfail("FSLDIR" not in os.environ, reason="no FSL found", raises=FileNotFoundError) @pytest.mark.parametrize( "inputs, outputs", - [({"in_file": "test.nii.gz", "t_min": 0, "t_size": 1}, ["roi_file"])], + [ + ({"in_file": "test.nii.gz", "t_min": 0, "t_size": 1}, ["roi_file"]), + ( + { + "in_file": "test.nii.gz", + "x_min": 0, + "x_size": 1, + "y_min": 20, + "y_size": 1, + "z_min": 10, + "z_size": 1, + }, + ["roi_file"], + ), + ], ) def test_ExtractROI(test_data, inputs, outputs): if inputs is None: diff --git a/pydra/tasks/fsl/utils/tests/test_spec_extractroi.py b/pydra/tasks/fsl/utils/tests/test_spec_extractroi.py index 3496f3f..6457929 100644 --- a/pydra/tasks/fsl/utils/tests/test_spec_extractroi.py +++ b/pydra/tasks/fsl/utils/tests/test_spec_extractroi.py @@ -5,7 +5,21 @@ @pytest.mark.parametrize( "inputs, outputs", - [({"in_file": "test.nii.gz", "t_min": 0, "t_size": 1}, ["roi_file"])], + [ + ({"in_file": "test.nii.gz", "t_min": 0, "t_size": 1}, ["roi_file"]), + ( + { + "in_file": "test.nii.gz", + "x_min": 0, + "x_size": 1, + "y_min": 20, + "y_size": 1, + "z_min": 10, + "z_size": 1, + }, + ["roi_file"], + ), + ], ) def test_ExtractROI(test_data, inputs, outputs): if inputs is None: diff --git a/specs/fsl_utils_param.yml b/specs/fsl_utils_param.yml index f62cc9f..0ad95de 100644 --- a/specs/fsl_utils_param.yml +++ b/specs/fsl_utils_param.yml @@ -90,21 +90,29 @@ ExtractROI: output_requirements: roi_file: [in_file] output_templates: - roi_file: "{in_file}_trim" + roi_file: "{in_file}_roi" inputs_drop: - crop_list doctest: in_file: test.nii.gz t_min: 0 t_size: 3 - roi_file: test_trim.nii.gz - cmdline: fslroi test.nii.gz test_trim.nii.gz 0 3 + roi_file: test_roi.nii.gz + cmdline: fslroi test.nii.gz test_roi.nii.gz 0 3 tests_inputs: - in_file: test.nii.gz t_min: 0 t_size: 1 + - in_file: test.nii.gz + x_min: 0 + x_size: 1 + y_min: 20 + y_size: 1 + z_min: 10 + z_size: 1 tests_outputs: - roi_file + - roi_file FilterRegressor: output_requirements: