diff --git a/scripts/extension/registration/apply_registration.py b/scripts/extension/registration/apply_registration.py index 9b8b7080af96eda4e33b6b691c7225dfb3bc141e..01631ae960195187d961bf4aa3f2cf6d491cf1af 100644 --- a/scripts/extension/registration/apply_registration.py +++ b/scripts/extension/registration/apply_registration.py @@ -98,9 +98,16 @@ def apply_for_file(input_path, output_path, transformation_file, fiji_executable, elastix_directory, tmp_folder, n_threads): - # grrr design anti-pattern + assert os.path.exists(elastix_directory) + assert os.path.exists(tmp_folder) + assert os.path.exists(input_path) + assert os.path.exists(transformation_file) + assert os.path.exists(os.path.split(output_path)[0]) + + # transformix arguments need to be passed as one string, + # with individual arguments comma separated # the argument to transformaix needs to be one large comma separated string - transformix_argument = ["elastix_directory=\'%s\'" % elastix_directory, + transformix_argument = ["elastixDirectory=\'%s\'" % elastix_directory, "workingDirectory=\'%s\'" % tmp_folder, "inputImageFile=\'%s\'" % input_path, "transformationFile=\'%s\'" % transformation_file, diff --git a/test/registration/check_wrapper.py b/test/registration/check_wrapper.py index 46712b5741ad8eaab1020f9480113e5a95e98588..12fa5bc92d47c80f93dd8d1a6dd1df1dd8d16bd6 100644 --- a/test/registration/check_wrapper.py +++ b/test/registration/check_wrapper.py @@ -9,8 +9,8 @@ from scripts.extension.registration import ApplyRegistrationLocal def check_wrapper(): - in_path = '/g/kreshuk/pape/Work/my_projects/platy-browser-data/registration/stomach_target_prospr.tif' - out_path = '/g/kreshuk/pape/Work/my_projects/platy-browser-data/registration/stomach_target_prospr_registered' + in_path = '/g/kreshuk/pape/Work/my_projects/platy-browser-data/registration/9.9.9/images/ProSPr/Stomach_forRegistration.tif' + out_path = '/g/kreshuk/pape/Work/my_projects/dev-platy/test/registration/somach_prospr_registered' in_list = [in_path] out_list = [out_path]