diff --git a/bin/tests/test_wm_cluster_from_atlas.py b/bin/tests/test_wm_cluster_from_atlas.py index 33d4f158..e7af2b46 100755 --- a/bin/tests/test_wm_cluster_from_atlas.py +++ b/bin/tests/test_wm_cluster_from_atlas.py @@ -4,3 +4,21 @@ def test_help_option(script_runner): ret = script_runner.run(["wm_cluster_from_atlas.py", "--help"]) assert ret.success + + +# def test_execution(script_runner): + # length = 40 + # in_tractography_fname = ( + # "registered_subject_output/bundle/output_tractography/bundle_reg.vtk" + # ) + # in_atlas_dirname = "ORG-800FC-100HCP" + # out_dirname = "subject_cluster_output" + # ret = script_runner.run( + # "wm_cluster_from_atlas.py", + # "-l", + # length, + # in_tractography_fname, + # in_atlas_dirname, + # out_dirname, + # ) + # assert ret.success diff --git a/bin/tests/test_wm_cluster_remove_outliers.py b/bin/tests/test_wm_cluster_remove_outliers.py new file mode 100644 index 00000000..8f2638bf --- /dev/null +++ b/bin/tests/test_wm_cluster_remove_outliers.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +def test_help_option(script_runner): + ret = script_runner.run(["wm_cluster_remove_outliers.py", "--help"]) + assert ret.success + + +# def test_execution(script_runner): + # in_tractography_fname = "subject_cluster_output/bundle_reg" + # in_atlas_fname = "ORG-800FC-100HCP" + # out_dirname = "ORG-800FC-100HCP" + # ret = script_runner.run( + # "wm_cluster_remove_outliers.py", + # in_tractography_fname, + # in_atlas_fname, + # out_dirname, + # ) + # assert ret.success diff --git a/bin/tests/test_wm_quality_control_tractography.py b/bin/tests/test_wm_quality_control_tractography.py index 7bfe45d8..5ec2e7da 100755 --- a/bin/tests/test_wm_quality_control_tractography.py +++ b/bin/tests/test_wm_quality_control_tractography.py @@ -1,6 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- + def test_help_option(script_runner): ret = script_runner.run(["wm_quality_control_tractography.py", "--help"]) assert ret.success + + +# def test_execution(script_runner): + # in_dirname = "input_tractography" + # out_dirname = "qc_output" + # ret = script_runner.run( + # "wm_quality_control_tractography.py", in_dirname, out_dirname, + # ) + # assert ret.success diff --git a/bin/tests/test_wm_register_to_atlas_new.py b/bin/tests/test_wm_register_to_atlas_new.py index 180b1fc9..44ca521d 100755 --- a/bin/tests/test_wm_register_to_atlas_new.py +++ b/bin/tests/test_wm_register_to_atlas_new.py @@ -4,3 +4,22 @@ def test_help_option(script_runner): ret = script_runner.run(["wm_register_to_atlas_new.py", "--help"]) assert ret.success + + +# def test_execution(script_runner): + # length = 40 + # mode = "affine" + # in_tractography_fname = "input_tractography/bundle.vtk" + # in_atlas_fname = "ORG-RegAtlas-100HCP/registration_atlas.vtk" + # out_dirname = "registered_subject_output" + # ret = script_runner.run( + # "wm_register_to_atlas_new.py", + # "-l", + # length, + # "-mode", + # mode, + # in_tractography_fname, + # in_atlas_fname, + # out_dirname, + # ) + # assert ret.success diff --git a/bin/tests/test_wm_separate_clusters_by_hemisphere.py b/bin/tests/test_wm_separate_clusters_by_hemisphere.py index fe6eef16..f7cf82c4 100755 --- a/bin/tests/test_wm_separate_clusters_by_hemisphere.py +++ b/bin/tests/test_wm_separate_clusters_by_hemisphere.py @@ -4,3 +4,14 @@ def test_help_option(script_runner): ret = script_runner.run(["wm_separate_clusters_by_hemisphere.py", "--help"]) assert ret.success + + +# def test_execution(script_runner): + # in_dirname = "subject_cluster_outlier_removed_output" + # out_dirname = "subject_cluster_separated_output" + # ret = script_runner.run( + # "wm_separate_clusters_by_hemisphere.py", + # in_dirname, + # out_dirname, + # ) + # assert ret.success diff --git a/setup.py b/setup.py index 8cc0d19b..4e48c688 100755 --- a/setup.py +++ b/setup.py @@ -45,6 +45,5 @@ scripts=list(chain.from_iterable([ glob.glob("bin/[a-zA-Z]*.py"), glob.glob("utilities/[a-zA-Z]*.py"), - # ['testing/test_run.py'] ])) ) diff --git a/testing/test_run.py b/testing/test_run.py deleted file mode 100755 index 391d1122..00000000 --- a/testing/test_run.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import sys -import wm_quality_control_tractography -import wm_register_to_atlas_new -import wm_cluster_from_atlas -import wm_cluster_remove_outliers -import wm_separate_clusters_by_hemisphere -import numpy as np -import random - -np.random.seed(0) -random.seed(0) - -sys.argv = ['wm_quality_control_tractography.py', 'input_tractography/', 'qc_output/'] -wm_quality_control_tractography.main() - -sys.argv =['wm_register_to_atlas_new.py', '-l', '40', '-mode', 'affine', 'input_tractography/bundle.vtk', 'ORG-RegAtlas-100HCP/registration_atlas.vtk', 'registered_subject_output/'] -wm_register_to_atlas_new.main() - -sys.argv =['wm_cluster_from_atlas.py', '-l', '40', 'registered_subject_output/bundle/output_tractography/bundle_reg.vtk', 'ORG-800FC-100HCP/', 'subject_cluster_output/'] -wm_cluster_from_atlas.main() - -sys.argv =['wm_cluster_remove_outliers.py', 'subject_cluster_output/bundle_reg', 'ORG-800FC-100HCP/', 'subject_cluster_outlier_removed_output/'] -wm_cluster_remove_outliers.main() - -sys.argv = ['wm_separate_clusters_by_hemisphere.py', 'subject_cluster_outlier_removed_output/', 'subject_cluster_separated_output/'] -wm_separate_clusters_by_hemisphere.main()