Forráskód Böngészése

intermideiat step

arefks 7 hónapja
szülő
commit
a6c636f3fb
2 módosított fájl, 16 hozzáadás és 2 törlés
  1. 1 1
      code/GetQuantitativeValues.py
  2. 15 1
      code/ProofOfModalities.py

+ 1 - 1
code/GetQuantitativeValues.py

@@ -137,7 +137,7 @@ def main():
     df = process_files(args.input, args.output,args.figures)
 
     # Save the DataFrame as CSV
-    csv_file = os.path.join(args.output, "data_summary.csv")
+    csv_file = os.path.join(args.output, "Quantitative_results_from_dwi_processing.csv")
     df.to_csv(csv_file, index=False)
     print("CSV file created at:", csv_file)
 

+ 15 - 1
code/ProofOfModalities.py

@@ -1,8 +1,22 @@
 import nibabel as nib
 import numpy as np
 
+
+
+# Get the directory where the code file is located
+code_dir = os.path.dirname(os.path.abspath(__file__))
+
+# Get the parent directory of the code directory
+parent_dir = os.path.dirname(code_dir)
+viral_tracing_SearchPath = os.path.join(parent_dir,"output","Viral_tracing_flipped","*.nii*")
+viral_tracing_files = glob.glob(viral_tracing_SearchPath)
+
+masks_SearchPath = os.path.join(parent_dir,"output","Viral_tracing_density_maps_from_Jupyter_Notebook","*.nii*")
+
+
+
 # Load NIfTI viral tracing data
-viral_tracing_img = nib.load(r"E:\2024_Ruthe_SND\output\Viral_tracing_flipped\Mop_projection_density_VT_mask.nii.gz"")
+viral_tracing_img = nib.load(r"E:\2024_Ruthe_SND\output\Viral_tracing_flipped\Mop_projection_density_VT_mask.nii.gz")
 viral_tracing_data = viral_tracing_img.get_fdata()
 
 # Load NIfTI mask data