imi-bigpicture / wsidicom

Python package for reading DICOM WSI file sets.
Apache License 2.0
32 stars 5 forks source link

Validation of BigPicture dicom files #37

Closed jesper-molin closed 2 years ago

jesper-molin commented 2 years ago

Add support and/or document how to best validate that files follow the official BigPicture guidelines, supporting the scenario where you want to harmonize your dicom data:

if not WsiDicom.ready_for_viewing(folder_path):
    try:
        WsiDicom.open(folder_path).save(new_folder_path)
    except:
       raise Error("Dicom files was not ready for viewing, and it was not possible to convert it")

...

image = WsiDicom.open(folder_path, strict_mode=True)