You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The filter_files is used in the reproin heuristic (where it always
returns True), with this docstring: "Return True if a file should be
kept, else False". This commit adjusts the docs to effectively state
the same (it used to say the opposite).
The docstring in the heudiconv heuristic was right: filter_files is
fed to `dicoms.py::group_dicoms_into_seqinfos()` as `file_filter`,
where it is applied with built-in `filter()` to the to-be-processed
file list; `filter()` yields items for which `function(item) == True`.
N.B. This change makes it clear that `filter_files` and `filter_dicom`
have opposite logic. The latter is fed to
`dicoms.py::group_dicoms_into_seqinfos()` as `dcmfilter`; `dcmfilter`
is passed into `dicoms.py::validate_dicom()`; validate_dicom returns
`None` (meaning: *not valid*) if `dcmfilter(mw.dcm_data)` is `True`.
So for a file to be kept, `filter_files` must return `True`, and
`filter_dicom` must return `False`. This commit changes the
documentation rather than the logic, assuming that the logic has been
present long enough to warrant preservation (it is also easier to only
change the docs).
0 commit comments