Commit b14174f4 authored by Fernando Perez-Garcia's avatar Fernando Perez-Garcia

Add spatial window size to config kwargs

parent 062cad66
......@@ -446,10 +446,13 @@ class Model:
# print(self.config_path)
def config_input_data(self, pixdim=None, only_input=False):
def config_input_data(self,
pixdim=None,
only_input=False,
spatial_window_size=TRAINING_IMAGE_WINDOW_SIZE):
self.config[DSA] = {
'csv_file': self.csv_dsa_path,
'spatial_window_size': 3 * (TRAINING_IMAGE_WINDOW_SIZE,),
'spatial_window_size': 3 * (spatial_window_size,),
'interp_order': X_INTERPOLATION,
'axcodes': 'R, A, S',
}
......@@ -457,7 +460,7 @@ class Model:
if T1 in self.inputs:
self.config[T1] = {
'csv_file': self.csv_t1_path,
'spatial_window_size': 3 * (TRAINING_IMAGE_WINDOW_SIZE,),
'spatial_window_size': 3 * (spatial_window_size,),
'interp_order': X_INTERPOLATION,
'axcodes': 'R, A, S',
}
......@@ -465,7 +468,7 @@ class Model:
if T1_GAD in self.inputs:
self.config[T1_GAD] = {
'csv_file': self.csv_t1_gad_path,
'spatial_window_size': 3 * (TRAINING_IMAGE_WINDOW_SIZE,),
'spatial_window_size': 3 * (spatial_window_size,),
'interp_order': X_INTERPOLATION,
'axcodes': 'R, A, S',
}
......@@ -473,21 +476,21 @@ class Model:
if not only_input:
self.config[LABEL] = {
'csv_file': self.csv_y_path,
'spatial_window_size': 3 * (TRAINING_LABEL_WINDOW_SIZE,),
'spatial_window_size': 3 * (spatial_window_size,),
'interp_order': NEAREST_NEIGHBOR,
'axcodes': 'R, A, S',
}
self.config[SAMPLER] = {
'csv_file': self.csv_sampling_maps_path,
'spatial_window_size': 3 * (TRAINING_LABEL_WINDOW_SIZE,),
'spatial_window_size': 3 * (spatial_window_size,),
'interp_order': NEAREST_NEIGHBOR,
'axcodes': 'R, A, S',
}
# self.config[RADII] = {
# 'csv_file': self.csv_radii_path,
# 'spatial_window_size': 3 * (TRAINING_LABEL_WINDOW_SIZE,),
# 'spatial_window_size': 3 * (spatial_window_size,),
# 'interp_order': X_INTERPOLATION,
# 'axcodes': 'R, A, S',
# }
......@@ -495,7 +498,7 @@ class Model:
# if self.error_dir.is_dir():
# self.config[ERROR] = {
# 'csv_file': self.csv_error_path,
# 'spatial_window_size': 3 * (TRAINING_LABEL_WINDOW_SIZE,),
# 'spatial_window_size': 3 * (spatial_window_size,),
# 'interp_order': X_INTERPOLATION,
# 'axcodes': 'R, A, S',
# }
......
Markdown is supported
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