Commit cce2d2a3 authored by Andrei-Claudiu Roibu's avatar Andrei-Claudiu Roibu 🖥
Browse files

added ValueError to load_file

parent b02c93dc
......@@ -211,7 +211,7 @@ def load_file_paths(data_directory, data_list, targets_directory=None):
file_paths (list): List containing the input data and target labelled output data
Raises:
None
ValueError: "Invalid data entry - check code and data entry format!"
"""
if data_list:
......@@ -222,8 +222,10 @@ def load_file_paths(data_directory, data_list, targets_directory=None):
if targets_directory == None:
file_paths = [[os.path.join(data_directory, volume)] for volume in volumes_to_be_used]
else:
elif:
file_paths = [[os.path.join(data_directory, volume), os.join.path(targets_directory, volume)] for volume in volumes_to_be_used]
else:
raise ValueError("Invalid data entry - check code and data entry format!")
return file_paths
......@@ -341,6 +343,7 @@ def load_and_preprocess_evaluation(file_path, orientation, min_max=True):
nifty_volume = nb.load(file_path[0])
if __name__ == "__main__":
folder_location = '/well/win-biobank/projects/imaging/data/data3/subjectsAll/'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment