Closed andylitalo closed 1 week ago
Running verify_dataset_integrity() checks all input images to make sure they have the exact same spacing, shape, direction, and origin. As a result, if there are negligible (e.g., 1e-10) discrepancies among images, it raises an error when none should be raised.
1e-10
Suggested fix: make BaseReaderWriter._check_all_same() similar to BaseReaderWriter._check_all_same_array() by replacing this check for exact equality with a check for closeness:
BaseReaderWriter._check_all_same()
BaseReaderWriter._check_all_same_array()
if not np.allclose(i, input_list[0]):
Thanks for the suggestion. I just changed it to np.allclose in master
Running verify_dataset_integrity() checks all input images to make sure they have the exact same spacing, shape, direction, and origin. As a result, if there are negligible (e.g.,
1e-10
) discrepancies among images, it raises an error when none should be raised.Suggested fix: make
BaseReaderWriter._check_all_same()
similar toBaseReaderWriter._check_all_same_array()
by replacing this check for exact equality with a check for closeness: