Hi,
I am trying to convert the DICOM metadata to a pandas dataframe using the code below
df = pd.DataFrame.from_dicom(items, n_workers = 8, threadpool = True)
but i receive the error message below
InvalidDicomError: File is missing DICOM File Meta Information header or the 'DICM' prefix is missing from the header. Use force=True to force reading.
Here is the traceback
InvalidDicomError Traceback (most recent call last)
/tmp/ipykernel_20586/3340457967.py in <module>
----> 1 dicom_df = pd.DataFrame.from_dicoms(items, n_workers = 8, threadpool = True, px_summ = False)
2 dicom_df.head()
~/miniconda3/envs/vision/lib/python3.7/site-packages/fastai/medical/imaging.py in _from_dicoms(cls, fns, n_workers, **kwargs)
392 @delegates(parallel)
393 def _from_dicoms(cls, fns, n_workers=0, **kwargs):
--> 394 return pd.DataFrame(parallel(_dcm2dict, fns, n_workers=n_workers, **kwargs))
395 pd.DataFrame.from_dicoms = classmethod(_from_dicoms)
396
~/miniconda3/envs/vision/lib/python3.7/site-packages/fastcore/parallel.py in parallel(f, items, n_workers, total, progress, pause, method, threadpool, timeout, chunksize, *args, **kwargs)
115 if total is None: total = len(items)
116 r = progress_bar(r, total=total, leave=False)
--> 117 return L(r)
118
119 # %% ../nbs/03a_parallel.ipynb 16
~/miniconda3/envs/vision/lib/python3.7/site-packages/fastcore/foundation.py in __call__(cls, x, *args, **kwargs)
96 def __call__(cls, x=None, *args, **kwargs):
97 if not args and not kwargs and x is not None and isinstance(x,cls): return x
---> 98 return super().__call__(x, *args, **kwargs)
99
...
--> 621 raise InvalidDicomError("File is missing DICOM File Meta Information "
622 "header or the 'DICM' prefix is missing from "
623 "the header. Use force=True to force reading.")
The pydicom version installed is 2.0.0
May you please assist me in diagnosing this problem
Thanks