neuropoly/medicaltorch

SliceFilter is an optional argument but is required

Closed this issue · 0 comments

slice_filter_fn is an optional argument but it's called whether it is defined or not. It should be either required or optional but called only if defined.
This would avoid the rather cryptic TypeError: 'NoneType' object is not callable

transform=None, slice_filter_fn=None, canonical=False):

filter_fn_ret_seg = self.slice_filter_fn(slice_seg_pair)