Hi Jan,
You are correct that for the challenge there will only be a single .mha stack in the input directory of the algorithm. So the for loop at line 77 for input_file in input_dir.glob("*.mha"):
is not necessary. There was some discussion on how to implement running the algorithm containers with multiple stacks for the test set, but this is now handled by running separate containers for each stack and then aggregating the results. This is handled by the evaluation container so you don't need to worry about that.
The later for loops over the separate .mha files (lines 85/106) are there since we unstack and save the separate VOI's so that the entire stack doesn't need to be loaded into memory at once during predictions.
Indeed in the end we again expect a single .mha file where the output predictions are stacked in the same order, as done in the baseline process.py script. This is due to a Grand Challenge requirement on an algorithms predictions needing the same shape as the input.
Kind regards,
Max