From 6bd15a250373dd73a4ee9646b1f92d37699c2abf Mon Sep 17 00:00:00 2001 From: arnaudbore Date: Mon, 4 Dec 2023 16:57:00 -0500 Subject: [PATCH 1/3] rename scripts --- .../legacy/scil_apply_transform_to_image.py | 22 +++++++++++++++++++ scripts/legacy/scil_count_non_zero_voxels.py | 22 +++++++++++++++++++ scripts/legacy/scil_crop_volume.py | 22 +++++++++++++++++++ scripts/legacy/scil_flip_volume.py | 20 +++++++++++++++++ scripts/legacy/scil_image_math.py | 20 +++++++++++++++++ scripts/legacy/scil_remove_outliers_ransac.py | 20 +++++++++++++++++ scripts/legacy/scil_resample_volume.py | 22 +++++++++++++++++++ scripts/legacy/scil_reshape_to_reference.py | 22 +++++++++++++++++++ scripts/legacy/scil_snr_in_roi.py | 20 +++++++++++++++++ scripts/legacy/scil_split_volume_by_ids.py | 6 ++--- ..._snr_in_roi.py => scil_dwi_compute_snr.py} | 0 ...mage.py => scil_volume_apply_transform.py} | 0 ...y => scil_volume_count_non_zero_voxels.py} | 0 ...cil_crop_volume.py => scil_volume_crop.py} | 0 ...cil_flip_volume.py => scil_volume_flip.py} | 0 ...scil_image_math.py => scil_volume_math.py} | 0 ... => scil_volume_remove_outliers_ransac.py} | 0 ...mple_volume.py => scil_volume_resample.py} | 0 ...py => scil_volume_reshape_to_reference.py} | 0 ..._snr_in_roi.py => test_dwi_compute_snr.py} | 4 ++-- ...mage.py => test_volume_apply_transform.py} | 4 ++-- ...y => test_volume_count_non_zero_voxels.py} | 4 ++-- ...est_crop_volume.py => test_volume_crop.py} | 0 ...est_flip_volume.py => test_volume_flip.py} | 4 ++-- ...test_image_math.py => test_volume_math.py} | 12 +++++----- ... => test_volume_remove_outliers_ransac.py} | 4 ++-- ...mple_volume.py => test_volume_resample.py} | 4 ++-- ...py => test_volume_reshape_to_reference.py} | 6 ++--- 28 files changed, 214 insertions(+), 24 deletions(-) create mode 100755 scripts/legacy/scil_apply_transform_to_image.py create mode 100755 scripts/legacy/scil_count_non_zero_voxels.py create mode 100755 scripts/legacy/scil_crop_volume.py create mode 100644 scripts/legacy/scil_flip_volume.py create mode 100644 scripts/legacy/scil_image_math.py create mode 100644 scripts/legacy/scil_remove_outliers_ransac.py create mode 100755 scripts/legacy/scil_resample_volume.py create mode 100755 scripts/legacy/scil_reshape_to_reference.py create mode 100644 scripts/legacy/scil_snr_in_roi.py rename scripts/{scil_snr_in_roi.py => scil_dwi_compute_snr.py} (100%) rename scripts/{scil_apply_transform_to_image.py => scil_volume_apply_transform.py} (100%) rename scripts/{scil_count_non_zero_voxels.py => scil_volume_count_non_zero_voxels.py} (100%) rename scripts/{scil_crop_volume.py => scil_volume_crop.py} (100%) rename scripts/{scil_flip_volume.py => scil_volume_flip.py} (100%) rename scripts/{scil_image_math.py => scil_volume_math.py} (100%) rename scripts/{scil_remove_outliers_ransac.py => scil_volume_remove_outliers_ransac.py} (100%) rename scripts/{scil_resample_volume.py => scil_volume_resample.py} (100%) rename scripts/{scil_reshape_to_reference.py => scil_volume_reshape_to_reference.py} (100%) rename scripts/tests/{test_snr_in_roi.py => test_dwi_compute_snr.py} (89%) rename scripts/tests/{test_apply_transform_to_image.py => test_volume_apply_transform.py} (86%) rename scripts/tests/{test_count_non_zero_voxels.py => test_volume_count_non_zero_voxels.py} (79%) rename scripts/tests/{test_crop_volume.py => test_volume_crop.py} (100%) rename scripts/tests/{test_flip_volume.py => test_volume_flip.py} (83%) rename scripts/tests/{test_image_math.py => test_volume_math.py} (86%) rename scripts/tests/{test_remove_outliers_ransac.py => test_volume_remove_outliers_ransac.py} (80%) rename scripts/tests/{test_resample_volume.py => test_volume_resample.py} (83%) rename scripts/tests/{test_reshape_to_reference.py => test_volume_reshape_to_reference.py} (83%) diff --git a/scripts/legacy/scil_apply_transform_to_image.py b/scripts/legacy/scil_apply_transform_to_image.py new file mode 100755 index 000000000..ea527f075 --- /dev/null +++ b/scripts/legacy/scil_apply_transform_to_image.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_volume_apply_transform import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_volume_apply_transform.py. Please change +your existing pipelines accordingly. + +""" + + +@deprecate_script("scil_apply_transform_to_image.py", + DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_count_non_zero_voxels.py b/scripts/legacy/scil_count_non_zero_voxels.py new file mode 100755 index 000000000..17fd5ce32 --- /dev/null +++ b/scripts/legacy/scil_count_non_zero_voxels.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_volume_count_non_zero_voxels import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_volume_count_non_zero_voxels.py. Please change +your existing pipelines accordingly. + +""" + + +@deprecate_script("scil_count_non_zero_voxels.py", + DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_crop_volume.py b/scripts/legacy/scil_crop_volume.py new file mode 100755 index 000000000..800268182 --- /dev/null +++ b/scripts/legacy/scil_crop_volume.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_volume_crop import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_volume_crop.py. Please change +your existing pipelines accordingly. + +""" + + +@deprecate_script("scil_crop_volume.py", + DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_flip_volume.py b/scripts/legacy/scil_flip_volume.py new file mode 100644 index 000000000..78f329cf0 --- /dev/null +++ b/scripts/legacy/scil_flip_volume.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_volume_flip import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_volume_flip.py. +Please change your existing pipelines accordingly. +""" + + +@deprecate_script("scil_flip_volume.py", DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_image_math.py b/scripts/legacy/scil_image_math.py new file mode 100644 index 000000000..fc5537c7f --- /dev/null +++ b/scripts/legacy/scil_image_math.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_volume_math import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_volume_math.py. +Please change your existing pipelines accordingly. +""" + + +@deprecate_script("scil_image_math.py", DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_remove_outliers_ransac.py b/scripts/legacy/scil_remove_outliers_ransac.py new file mode 100644 index 000000000..1e534c8b7 --- /dev/null +++ b/scripts/legacy/scil_remove_outliers_ransac.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_volume_remove_outliers_ransac import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_volume_remove_outliers_ransac.py. +Please change your existing pipelines accordingly. +""" + + +@deprecate_script("scil_remove_outliers_ransac.py", DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_resample_volume.py b/scripts/legacy/scil_resample_volume.py new file mode 100755 index 000000000..38cc44d09 --- /dev/null +++ b/scripts/legacy/scil_resample_volume.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_volume_resample import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_volume_resample.py. Please change +your existing pipelines accordingly. + +""" + + +@deprecate_script("scil_resample_volume.py", + DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_reshape_to_reference.py b/scripts/legacy/scil_reshape_to_reference.py new file mode 100755 index 000000000..9f224a85f --- /dev/null +++ b/scripts/legacy/scil_reshape_to_reference.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_volume_reshape_to_reference import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_image_reshape_to_reference.py. Please change +your existing pipelines accordingly. + +""" + + +@deprecate_script("scil_reshape_to_reference.py", + DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_snr_in_roi.py b/scripts/legacy/scil_snr_in_roi.py new file mode 100644 index 000000000..1b481ea07 --- /dev/null +++ b/scripts/legacy/scil_snr_in_roi.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +from scilpy.io.deprecator import deprecate_script +from scripts.scil_dwi_compute_snr import main as new_main + + +DEPRECATION_MSG = """ +This script has been renamed scil_dwi_compute_snr.py. +Please change your existing pipelines accordingly. +""" + + +@deprecate_script("scil_snr_in_roi.py", DEPRECATION_MSG, '1.7.0') +def main(): + new_main() + + +if __name__ == "__main__": + main() diff --git a/scripts/legacy/scil_split_volume_by_ids.py b/scripts/legacy/scil_split_volume_by_ids.py index 326ee9c9c..0c39cdcfc 100644 --- a/scripts/legacy/scil_split_volume_by_ids.py +++ b/scripts/legacy/scil_split_volume_by_ids.py @@ -2,18 +2,18 @@ # -*- coding: utf-8 -*- from scilpy.io.deprecator import deprecate_script -from scripts.scil_tracking_local import main as new_main +from scripts.scil_labels_split_volume_by_ids import main as new_main DEPRECATION_MSG = """ -This script has been renamed scil_labels_split_volume_by_ids. +This script has been renamed scil_labels_split_volume_by_ids.py. Now, all our scripts using labels start with scil_labels_...! Please change your existing pipelines accordingly. """ -@deprecate_script("scil_split_volume_by_is.py", DEPRECATION_MSG, '1.7.0') +@deprecate_script("scil_split_volume_by_ids.py", DEPRECATION_MSG, '1.7.0') def main(): new_main() diff --git a/scripts/scil_snr_in_roi.py b/scripts/scil_dwi_compute_snr.py similarity index 100% rename from scripts/scil_snr_in_roi.py rename to scripts/scil_dwi_compute_snr.py diff --git a/scripts/scil_apply_transform_to_image.py b/scripts/scil_volume_apply_transform.py similarity index 100% rename from scripts/scil_apply_transform_to_image.py rename to scripts/scil_volume_apply_transform.py diff --git a/scripts/scil_count_non_zero_voxels.py b/scripts/scil_volume_count_non_zero_voxels.py similarity index 100% rename from scripts/scil_count_non_zero_voxels.py rename to scripts/scil_volume_count_non_zero_voxels.py diff --git a/scripts/scil_crop_volume.py b/scripts/scil_volume_crop.py similarity index 100% rename from scripts/scil_crop_volume.py rename to scripts/scil_volume_crop.py diff --git a/scripts/scil_flip_volume.py b/scripts/scil_volume_flip.py similarity index 100% rename from scripts/scil_flip_volume.py rename to scripts/scil_volume_flip.py diff --git a/scripts/scil_image_math.py b/scripts/scil_volume_math.py similarity index 100% rename from scripts/scil_image_math.py rename to scripts/scil_volume_math.py diff --git a/scripts/scil_remove_outliers_ransac.py b/scripts/scil_volume_remove_outliers_ransac.py similarity index 100% rename from scripts/scil_remove_outliers_ransac.py rename to scripts/scil_volume_remove_outliers_ransac.py diff --git a/scripts/scil_resample_volume.py b/scripts/scil_volume_resample.py similarity index 100% rename from scripts/scil_resample_volume.py rename to scripts/scil_volume_resample.py diff --git a/scripts/scil_reshape_to_reference.py b/scripts/scil_volume_reshape_to_reference.py similarity index 100% rename from scripts/scil_reshape_to_reference.py rename to scripts/scil_volume_reshape_to_reference.py diff --git a/scripts/tests/test_snr_in_roi.py b/scripts/tests/test_dwi_compute_snr.py similarity index 89% rename from scripts/tests/test_snr_in_roi.py rename to scripts/tests/test_dwi_compute_snr.py index 05e2c06d8..cc03f95a4 100644 --- a/scripts/tests/test_snr_in_roi.py +++ b/scripts/tests/test_dwi_compute_snr.py @@ -12,7 +12,7 @@ def test_help_option(script_runner): - ret = script_runner.run('scil_snr_in_roi.py', '--help') + ret = script_runner.run('scil_dwi_compute_snr.py', '--help') assert ret.success @@ -29,7 +29,7 @@ def test_snr(script_runner): noise_mask = os.path.join(get_home(), 'processing', 'small_roi_gm_mask.nii.gz') - ret = script_runner.run('scil_snr_in_roi.py', in_dwi, + ret = script_runner.run('scil_dwi_compute_snr.py', in_dwi, in_bval, in_bvec, in_mask, '--noise_mask', noise_mask, '--b0_thr', '10') diff --git a/scripts/tests/test_apply_transform_to_image.py b/scripts/tests/test_volume_apply_transform.py similarity index 86% rename from scripts/tests/test_apply_transform_to_image.py rename to scripts/tests/test_volume_apply_transform.py index d8333b9a1..e6d111aef 100644 --- a/scripts/tests/test_apply_transform_to_image.py +++ b/scripts/tests/test_volume_apply_transform.py @@ -13,7 +13,7 @@ def test_help_option(script_runner): - ret = script_runner.run('scil_apply_transform_to_image.py', '--help') + ret = script_runner.run('scil_volume_apply_transform.py', '--help') assert ret.success @@ -25,7 +25,7 @@ def test_execution_bst(script_runner): 'fa.nii.gz') in_aff = os.path.join(get_home(), 'bst', 'output0GenericAffine.mat') - ret = script_runner.run('scil_apply_transform_to_image.py', + ret = script_runner.run('scil_volume_apply_transform.py', in_model, in_fa, in_aff, 'template_lin.nii.gz', '--inverse') assert ret.success diff --git a/scripts/tests/test_count_non_zero_voxels.py b/scripts/tests/test_volume_count_non_zero_voxels.py similarity index 79% rename from scripts/tests/test_count_non_zero_voxels.py rename to scripts/tests/test_volume_count_non_zero_voxels.py index e682ed872..0eb3dd9dd 100644 --- a/scripts/tests/test_count_non_zero_voxels.py +++ b/scripts/tests/test_volume_count_non_zero_voxels.py @@ -13,7 +13,7 @@ def test_help_option(script_runner): - ret = script_runner.run('scil_count_non_zero_voxels.py', '--help') + ret = script_runner.run('scil_volume_count_non_zero_voxels.py', '--help') assert ret.success @@ -21,5 +21,5 @@ def test_execution_others(script_runner): os.chdir(os.path.expanduser(tmp_dir.name)) in_img = os.path.join(get_home(), 'others', 'rgb.nii.gz') - ret = script_runner.run('scil_count_non_zero_voxels.py', in_img) + ret = script_runner.run('scil_volume_count_non_zero_voxels.py', in_img) assert ret.success diff --git a/scripts/tests/test_crop_volume.py b/scripts/tests/test_volume_crop.py similarity index 100% rename from scripts/tests/test_crop_volume.py rename to scripts/tests/test_volume_crop.py diff --git a/scripts/tests/test_flip_volume.py b/scripts/tests/test_volume_flip.py similarity index 83% rename from scripts/tests/test_flip_volume.py rename to scripts/tests/test_volume_flip.py index 62c497d10..97ea1032e 100644 --- a/scripts/tests/test_flip_volume.py +++ b/scripts/tests/test_volume_flip.py @@ -13,7 +13,7 @@ def test_help_option(script_runner): - ret = script_runner.run('scil_flip_volume.py', '--help') + ret = script_runner.run('scil_volume_flip.py', '--help') assert ret.success @@ -21,6 +21,6 @@ def test_execution_surface_vtk_fib(script_runner): os.chdir(os.path.expanduser(tmp_dir.name)) in_fa = os.path.join(get_home(), 'surface_vtk_fib', 'fa.nii.gz') - ret = script_runner.run('scil_flip_volume.py', in_fa, 'fa_flip.nii.gz', + ret = script_runner.run('scil_volume_flip.py', in_fa, 'fa_flip.nii.gz', 'x') assert ret.success diff --git a/scripts/tests/test_image_math.py b/scripts/tests/test_volume_math.py similarity index 86% rename from scripts/tests/test_image_math.py rename to scripts/tests/test_volume_math.py index e29f5c946..07c8e7e01 100644 --- a/scripts/tests/test_image_math.py +++ b/scripts/tests/test_volume_math.py @@ -12,7 +12,7 @@ def test_help_option(script_runner): - ret = script_runner.run('scil_image_math.py', '--help') + ret = script_runner.run('scil_volume_math.py', '--help') assert ret.success @@ -24,7 +24,7 @@ def test_execution_add(script_runner): 'brainstem_174.nii.gz') in_img_3 = os.path.join(get_home(), 'atlas', 'brainstem_175.nii.gz') - ret = script_runner.run('scil_image_math.py', 'addition', + ret = script_runner.run('scil_volume_math.py', 'addition', in_img_1, in_img_2, in_img_3, 'brainstem.nii.gz') assert ret.success @@ -32,7 +32,7 @@ def test_execution_add(script_runner): def test_execution_low_thresh(script_runner): os.chdir(os.path.expanduser(tmp_dir.name)) in_img = os.path.join(get_home(), 'atlas', 'brainstem.nii.gz') - ret = script_runner.run('scil_image_math.py', 'lower_threshold', + ret = script_runner.run('scil_volume_math.py', 'lower_threshold', in_img, '1', 'brainstem_bin.nii.gz') assert ret.success @@ -40,7 +40,7 @@ def test_execution_low_thresh(script_runner): def test_execution_low_mult(script_runner): os.chdir(os.path.expanduser(tmp_dir.name)) in_img = os.path.join(get_home(), 'atlas', 'brainstem_bin.nii.gz') - ret = script_runner.run('scil_image_math.py', 'multiplication', + ret = script_runner.run('scil_volume_math.py', 'multiplication', in_img, '16', 'brainstem_unified.nii.gz') assert ret.success @@ -53,7 +53,7 @@ def test_execution_concatenate(script_runner): in_img_4 = os.path.join(get_home(), 'atlas', 'ids', '13.nii.gz') in_img_5 = os.path.join(get_home(), 'atlas', 'ids', '17.nii.gz') in_img_6 = os.path.join(get_home(), 'atlas', 'ids', '18.nii.gz') - ret = script_runner.run('scil_image_math.py', 'concatenate', + ret = script_runner.run('scil_volume_math.py', 'concatenate', in_img_1, in_img_2, in_img_3, in_img_4, in_img_5, in_img_6, 'concat_ids.nii.gz') assert ret.success @@ -65,7 +65,7 @@ def test_execution_concatenate_4D(script_runner): in_img_2 = os.path.join(get_home(), 'atlas', 'ids', '8_10.nii.gz') in_img_3 = os.path.join(get_home(), 'atlas', 'ids', '12.nii.gz') in_img_4 = os.path.join(get_home(), 'atlas', 'ids', '8_10.nii.gz') - ret = script_runner.run('scil_image_math.py', 'concatenate', + ret = script_runner.run('scil_volume_math.py', 'concatenate', in_img_1, in_img_2, in_img_3, in_img_4, 'concat_ids_4d.nii.gz') assert ret.success diff --git a/scripts/tests/test_remove_outliers_ransac.py b/scripts/tests/test_volume_remove_outliers_ransac.py similarity index 80% rename from scripts/tests/test_remove_outliers_ransac.py rename to scripts/tests/test_volume_remove_outliers_ransac.py index 1a833f47e..3c4890b19 100644 --- a/scripts/tests/test_remove_outliers_ransac.py +++ b/scripts/tests/test_volume_remove_outliers_ransac.py @@ -12,7 +12,7 @@ def test_help_option(script_runner): - ret = script_runner.run('scil_remove_outliers_ransac.py', '--help') + ret = script_runner.run('scil_volume_remove_outliers_ransac.py', '--help') assert ret.success @@ -20,6 +20,6 @@ def test_execution_processing(script_runner): os.chdir(os.path.expanduser(tmp_dir.name)) in_ad = os.path.join(get_home(), 'processing', 'ad.nii.gz') - ret = script_runner.run('scil_remove_outliers_ransac.py', in_ad, + ret = script_runner.run('scil_volume_remove_outliers_ransac.py', in_ad, 'ad_ransanc.nii.gz') assert ret.success diff --git a/scripts/tests/test_resample_volume.py b/scripts/tests/test_volume_resample.py similarity index 83% rename from scripts/tests/test_resample_volume.py rename to scripts/tests/test_volume_resample.py index 1ad15c1b0..9bf4cf81c 100644 --- a/scripts/tests/test_resample_volume.py +++ b/scripts/tests/test_volume_resample.py @@ -13,7 +13,7 @@ def test_help_option(script_runner): - ret = script_runner.run('scil_resample_volume.py', '--help') + ret = script_runner.run('scil_volume_resample.py', '--help') assert ret.success @@ -21,6 +21,6 @@ def test_execution_others(script_runner): os.chdir(os.path.expanduser(tmp_dir.name)) in_img = os.path.join(get_home(), 'others', 'fa.nii.gz') - ret = script_runner.run('scil_resample_volume.py', in_img, + ret = script_runner.run('scil_volume_resample.py', in_img, 'fa_resample.nii.gz', '--voxel_size', '2') assert ret.success diff --git a/scripts/tests/test_reshape_to_reference.py b/scripts/tests/test_volume_reshape_to_reference.py similarity index 83% rename from scripts/tests/test_reshape_to_reference.py rename to scripts/tests/test_volume_reshape_to_reference.py index 92ddff92d..6eeffc552 100644 --- a/scripts/tests/test_reshape_to_reference.py +++ b/scripts/tests/test_volume_reshape_to_reference.py @@ -13,7 +13,7 @@ def test_help_option(script_runner): - ret = script_runner.run('scil_reshape_to_reference.py', '--help') + ret = script_runner.run('scil_volume_reshape_to_reference.py', '--help') assert ret.success @@ -21,7 +21,7 @@ def test_execution_others(script_runner): os.chdir(os.path.expanduser(tmp_dir.name)) in_img = os.path.join(get_home(), 'others', 't1_crop.nii.gz') in_ref = os.path.join(get_home(), 'others', 't1.nii.gz') - ret = script_runner.run('scil_reshape_to_reference.py', in_img, + ret = script_runner.run('scil_volume_reshape_to_reference.py', in_img, in_ref, 't1_reshape.nii.gz', '--interpolation', 'nearest') assert ret.success @@ -31,7 +31,7 @@ def test_execution_4D(script_runner): os.chdir(os.path.expanduser(tmp_dir.name)) in_img = os.path.join(get_home(), 'commit_amico', 'dwi.nii.gz') in_ref = os.path.join(get_home(), 'others', 't1.nii.gz') - ret = script_runner.run('scil_reshape_to_reference.py', in_img, + ret = script_runner.run('scil_volume_reshape_to_reference.py', in_img, in_ref, 'dwi_reshape.nii.gz', '--interpolation', 'nearest') assert ret.success From fd4d73d6519ae7746b497a0b09c157ae687d5a70 Mon Sep 17 00:00:00 2001 From: arnaudbore Date: Mon, 4 Dec 2023 17:07:21 -0500 Subject: [PATCH 2/3] fix pep8 --- scripts/legacy/scil_count_non_zero_voxels.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/legacy/scil_count_non_zero_voxels.py b/scripts/legacy/scil_count_non_zero_voxels.py index 17fd5ce32..3295c769d 100755 --- a/scripts/legacy/scil_count_non_zero_voxels.py +++ b/scripts/legacy/scil_count_non_zero_voxels.py @@ -6,8 +6,8 @@ DEPRECATION_MSG = """ -This script has been renamed scil_volume_count_non_zero_voxels.py. Please change -your existing pipelines accordingly. +This script has been renamed scil_volume_count_non_zero_voxels.py. +Please change your existing pipelines accordingly. """ From 3ff6dcae13d09b6557735465875581dbdddd8dee Mon Sep 17 00:00:00 2001 From: arnaudbore Date: Tue, 5 Dec 2023 09:13:55 -0500 Subject: [PATCH 3/3] fix legacy --- scripts/legacy/scil_reshape_to_reference.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/legacy/scil_reshape_to_reference.py b/scripts/legacy/scil_reshape_to_reference.py index 9f224a85f..7cf58c2a9 100755 --- a/scripts/legacy/scil_reshape_to_reference.py +++ b/scripts/legacy/scil_reshape_to_reference.py @@ -6,9 +6,8 @@ DEPRECATION_MSG = """ -This script has been renamed scil_image_reshape_to_reference.py. Please change -your existing pipelines accordingly. - +This script has been renamed scil_volume_reshape_to_reference.py. +Please change your existing pipelines accordingly. """