DIAGNijmegen / rse-panimg

Conversion of medical images to MHA and TIFF.
Apache License 2.0
13 stars 5 forks source link

Add a `recurse_subdirectories: bool = True` kwarg to `convert` #42

Closed jmsmkn closed 3 years ago

jmsmkn commented 3 years ago

I would like panimg to only traverse the top level directory. Add this kwarg to convert and _convert_directory, check if the subdirectory should be processed at https://github.com/DIAGNijmegen/rse-panimg/blob/faf0c347d092d2ed1d3a9f5c95dd4588dd0d87cd/panimg/panimg.py#L86. Probably pass the kwarg down to the calls of _convert_directory too (although that is probably unnecessary). Add a test with an image in a subdirectory too and check that only the images from the top level directory are created.