Updated aggregator to avoid prefix of 0. This allows cases where a single subject ID is associated to a single inferred output to avoid the unecessary prefix.
@@ -85,6 +85,9 @@ class WindowAsImageAggregator(ImageWindowsAggregator):
def _save_current_image(self, idx, filename, image):
if image is None:
return
+ if idx == 0:
+ uniq_name = "{}{}.nii.gz".format(filename, self.postfix)
+ else:
uniq_name = "{}_{}{}.nii.gz".format(idx, filename, self.postfix)
misc_io.save_data_array(self.output_path, uniq_name, image, None)
with open(self.inferred_csv, 'a') as csv_file:
