From ee5a8e4048f079964d75a20335e241b09912abb8 Mon Sep 17 00:00:00 2001
From: Maciej Wielgosz <maciej.wielgosz@nibio.no>
Date: Wed, 18 Jan 2023 10:04:12 +0100
Subject: [PATCH] update in the seans pipeline to account for relative paths

---
 sean_sem_seg/run_single_file.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sean_sem_seg/run_single_file.py b/sean_sem_seg/run_single_file.py
index 9db78d0..7961f1a 100644
--- a/sean_sem_seg/run_single_file.py
+++ b/sean_sem_seg/run_single_file.py
@@ -98,7 +98,10 @@ if __name__ == "__main__":
 
     # copy the output "segmented_cleaned.las" to the output directory
     
-    results_dir_name = args.point_cloud.split('.')[0] + '_FSCT_output'
+    # results_dir_name = args.point_cloud.split('.')[0] + '_FSCT_output'
+    dir_core_name = os.path.dirname(args.point_cloud)
+    file_name = os.path.basename(args.point_cloud).split('.')[0]
+    results_dir_name = os.path.join(dir_core_name, file_name + '_FSCT_output')
 
     print("Copying results to output directory.")
     shutil.copy(os.path.join(results_dir_name, "segmented_cleaned.las"), args.odir)
-- 
GitLab