Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrei-Claudiu Roibu
BrainMapper
Commits
cce2d2a3
Commit
cce2d2a3
authored
Apr 03, 2020
by
Andrei-Claudiu Roibu
🖥
Browse files
added ValueError to load_file
parent
b02c93dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/data_utils.py
View file @
cce2d2a3
...
...
@@ -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
]
el
se
:
el
if
:
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/'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment