mikejhuang / LungNoduleDetectionClassification

Automated Extraction and Classification of Pulmonary Lung Nodules from CT Scans
130 stars 57 forks source link

Help for "folder names of CT data for each patient" code Reg- #10

Open NuthanakantiBhaskar opened 4 years ago

NuthanakantiBhaskar commented 4 years ago

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

spx1997 commented 4 years ago

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!

MedoSaied commented 2 years ago

I have the same issue and I can't solve it.

OmkarNevse commented 8 months ago

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?