6627 reading dcm folder filtering filenames#7181
Conversation
|
Should we test specifically for passing a different pattern, or a pattern which matches nothing? |
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
00e0025 to
c205c5a
Compare
ericspod
left a comment
There was a problem hiding this comment.
Looks good here. We've encountered the issue here of exceptions being raised when trying to read a non-DICOM file such as the LICENSE file. The approach I've used in the past with pydicom is to try to read everything and skip over any file raising InvalidDicomError, this has unintented consequences of course. What we can do instead is use is_dicom from the library to check any file first if this doesn't have too much of a performance penalty.
Signed-off-by: Wenqi Li <[email protected]>
thanks! I'm adding some exception handling for InvalidDicomError, and user can set |
|
/build |
Fixes Project-MONAI#6627 ### Description adding a `fname_regex` option to the pydicom reader ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Mark Graham <[email protected]>
Fixes Project-MONAI#6627 ### Description adding a `fname_regex` option to the pydicom reader ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Yu0610 <[email protected]>
Fixes #6627
Description
adding a
fname_regexoption to the pydicom readerTypes of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.