imi-bigpicture / wsidicomizer

Python library for converting WSI files to DICOM
Apache License 2.0
54 stars 7 forks source link

Levels flag not working #92

Closed saikrishnaksbs closed 7 months ago

saikrishnaksbs commented 7 months ago

When i am giving -l 7 in the cli for levels for convertion of tiff to dicom, only one dicom file is getting generated but if i don't mention anything then 10 dicom files are getting generated.

This is the command i am using wsidicomizer -i '/Users/sigtupleitadmin/Documents/test_dicom/604.tif' -o '/Users/sigtupleitadmin/Documents/test_dicom/' -l 8 --format 'jpeg2000'

erikogabrielsson commented 7 months ago

The -l flag takes a sequence of level indices that should be included. If you specify -l 8 you should only get the 8:th level in the list of levels, if you specify -l 7 8 you should get both the 7:th and the 8th. You can also specify negative indices, such as -l -1 to only get the last level. If you dont use -l all levels should be included.

Maybe you wanted the -l argument to take a number of levels to convert, so that -l 8 whould include the first 8 levels? For this you would need to use -l 0 1 2 3 4 5 6 7. Adding support for ranges like -l 0:7 could be a future improvement.

saikrishnaksbs commented 7 months ago

Thankyou erikogabrielsson