Help for "folder names of CT data for each patient" code Reg-
NuthanakantiBhaskar opened this issue · comments
#File paths
metadatapath="D:/LIDC Dataset/LIDC-IDRI_MetaData.csv"
list32path="D:/LIDC Dataset/list3.2.csv"
DOIfolderpath='D:/LIDC Dataset/LIDC-IDRI/'
datafolder='D:/LIDC Dataset/datafolder/'
########################################
#Load metadata
meta=pd.read_csv(metadatapath)
meta=meta.drop(meta[meta['Modality']!='CT'].index)
meta=meta.reset_index()
#Get folder names of CT data for each patient
patients=[DOIfolderpath+meta['Patient Id'][i] for i in range(len(meta))]
datfolder=[]
for i in range(0,len(meta)-1):
for path in os.listdir(patients[i]):
if os.path.exists(patients[i]+'/'+path+'/'+meta['Series UID'][i]):
datfolder.append(patients[i]+'/'+path+'/'+meta['Series UID'][i])
patients=datfolder
Respected Madam,
In my System images path: D:/LIDC Dataset/LIDC-IDRI/LIDC-IDRI-0001/01-01-2000-30178/3000566.000000-03192/
based on this above code is not appending any data to patients and it is showing IndexError: list index out of range.
So, please provide the solution of my code , your support is going to help a lot for my research work.
Thanks in the advance
hi, this problem may be caused by different folder organization. In older downloads, the data DICOM data would download as:[...]/LIDC-IDRI/LIDC-IDRI-dddd/uid1/uid2/dicom_file.dcm
. However, in more recent downloads, the data is downloaded like: [...]/LIDC-IDRI/LIDC-IDRI-dddd/???
. Your can go to pylidc for more detail.
good luck!
I have the same issue and I can't solve it.
hi, this problem may be caused by different folder organization. In older downloads, the data DICOM data would download as:
[...]/LIDC-IDRI/LIDC-IDRI-dddd/uid1/uid2/dicom_file.dcm
. However, in more recent downloads, the data is downloaded like:[...]/LIDC-IDRI/LIDC-IDRI-dddd/???
. Your can go to pylidc for more detail. good luck!
Is there a way to fix this apart from trying to download the old dataset?