diff --git a/tests/test_demo.py b/tests/test_demo.py index 1b2d143..da298d1 100644 --- a/tests/test_demo.py +++ b/tests/test_demo.py @@ -10,8 +10,7 @@ # get path to the current directory # local_path = os.path.dirname( os.path.realpath( __file__ ) ) -def run_commit_StickZeppelinBall(): - local_path = "/media/full/DATA/Software/COMMIT_versions/demo_data" +def run_commit_StickZeppelinBall(local_path): trk2dictionary.run( filename_tractogram = os.path.join( local_path, 'demo01_fibers.tck' ), filename_peaks = os.path.join( local_path, 'peaks.nii.gz' ), @@ -43,8 +42,7 @@ def run_commit_StickZeppelinBall(): mit.save_results() -def run_commit_BallandStick(): - local_path = "/media/full/DATA/Software/COMMIT_versions/demo_data" +def run_commit_BallandStick(local_path): trk2dictionary.run( filename_tractogram = os.path.join( local_path, 'demo01_fibers.tck' ), filename_peaks = os.path.join( local_path, 'peaks.nii.gz' ), @@ -75,8 +73,7 @@ def run_commit_BallandStick(): mit.save_results() -def run_commit_VolumeFractions(): - local_path = "/media/full/DATA/Software/COMMIT_versions/demo_data" +def run_commit_VolumeFractions(local_path): trk2dictionary.run( filename_tractogram = os.path.join( local_path, 'demo01_fibers.tck' ), filename_peaks = os.path.join( local_path, 'peaks.nii.gz' ), @@ -125,15 +122,15 @@ def check_results(pickle_result, ref_pickle): def run_tests(): - local_path = os.path.dirname( os.path.realpath( __file__ ) ) - out_path = "/media/full/DATA/Software/COMMIT_versions/demo_data" - ref_pickle_StickZeppelinBall = os.path.join( local_path, 'demo_data', 'ref_results', 'ref_results_StickZeppelinBall.pickle' ) - ref_pickle_BallandStick = os.path.join( local_path, 'demo_data', 'ref_results', 'ref_results_BallandStick.pickle' ) - # ref_pickle_VolumeFractions = os.path.join( local_path, 'demo_data', 'results_VolumeFractions.pickle' ) - run_commit_StickZeppelinBall() + local_path = os.path.join(os.path.dirname( os.path.realpath( __file__ ) ), 'demo_data') + out_path = os.path.join( local_path, 'ref_results' ) + ref_pickle_StickZeppelinBall = os.path.join( local_path, 'ref_results', 'ref_results_StickZeppelinBall.pickle' ) + ref_pickle_BallandStick = os.path.join( local_path, 'ref_results', 'ref_results_BallandStick.pickle' ) + # ref_pickle_VolumeFractions = os.path.join( local_path, 'results_VolumeFractions.pickle' ) + run_commit_StickZeppelinBall(local_path) results_pickle = os.path.join( out_path, 'COMMIT', 'Results_StickZeppelinBall', 'results.pickle' ) check_results(results_pickle, ref_pickle_StickZeppelinBall) - run_commit_BallandStick() + run_commit_BallandStick(local_path) results_pickle = os.path.join( out_path, 'COMMIT', 'Results_StickZeppelinBall', 'results.pickle' ) check_results(results_pickle, ref_pickle_BallandStick) # run_commit_VolumeFractions()