How can I ignore files/subjects with error?
SWKoreaBME opened this issue · comments
Sangwook commented
Hi,
I tried using med-imagetools to process the dataset.
But I got an error and it stopped. Is there any way to ignore the files with an error and make it keep processing?
Just in case the error message is:
Traceback (most recent call last):
File "/cluster/home/kimsa/anaconda3/envs/torch38/lib/python3.8/site-packages/imgtools/modules/structureset.py", line 114, in get_mask
mask[z, :, :, idx] += slice_mask
IndexError: index 119 is out of bounds for axis 0 with size 119
Thank you!
Sejin Kim commented
it seems like the image-mask geometry is slightly offset and the slice you're looking to add is just outside of the size of the image.
try using the --warn_on_error
flag to skip bad samples.
Sangwook commented
Thank you! I will try using the flag :)