I have few files in my GCP bucket folder like below:
- image1.dicom
- image2.dicom
- image3
- file1
- file4.dicom
Now, I want to even check the files which has no extension i.e image3, file1
are dicom or not.
I use pydicom reader to read dicom files to get the data.
dicom_dataset = pydicom.dcmread("dicom_image_file_path")
Please suggest is there a way to validate the above two files are dicom or not in one sentence.