MIC-DKFZ / LIDC-IDRI-processing

Scripts for the preprocessing of LIDC-IDRI data
MIT License
75 stars 19 forks source link

No DICOMS's found for file: #1

Open shanpriya3 opened 5 years ago

shanpriya3 commented 5 years ago

Hello, I am trying to preprocess the LIDC dataset but I am getting the following errors.

No DICOM's found for file: /LIDC-IDRI-Preprocessing/LIDC_Dataset/XML_Data/LIDC-XML-only/tcia-lidc-xml/186/075.xml /LIDC-IDRI-Preprocessing/LIDC_Dataset/XML_Data/LIDC-XML-only/tcia-lidc-xml/186/049.xml /LIDC-IDRI-Preprocessing/LIDC_Dataset/XML_Data/LIDC-XML-only/tcia-lidc-xml/186/049.xml 1.3.6.1.4.1.14519.5.2.1.6279.6001.212697393127299815450339637649 1.3.6.1.4.1.14519.5.2.1.6279.6001.410251741986998833890312367579 [] No DICOM's found for file: /LIDC-IDRI-Preprocessing/LIDC_Dataset/XML_Data/LIDC-XML-only/tcia-lidc-xml/186/049.xml (CMAKE_QT) dv00:/LIDC-IDRI-Preprocessing/LIDC-IDRI-processing$

MiGoetz commented 5 years ago

Hi, do you get any results or is the script stopping without results? What is the file structure of your data?

shanpriya3 commented 5 years ago

I don't get any results. The script stops working.

I have downloaded, extracted copied the images and XML files in the corresponding folders Images folder: /LIDC-IDRI-Preprocessing/LIDC_Dataset/Images/LIDC-IDRI/LIDC-IDRI-0002…...LIDC-IDRI-1012/

LIDC-IDRI-xxxx has some folders xmls folder:
/LIDC-IDRI-Preprocessing/LIDC_Dataset/XML_Data/LIDC-XML-only/tcia-lidc-xml/

tcia-lidc-xml has 6 folders containing xml files

MiGoetz commented 5 years ago

On what system are you working? Did you adapt the paths to the file (At the top of the file: lidc_data_to_nifti.py)

shanpriya3 commented 5 years ago

I am using Ubuntu-18.04.

Yes, I did

path_to_executables="~/MITK-superbuild/MITK-build/bin" path_to_dicoms = "~/LIDC-IDRI-Preprocessing/LIDC_less/Img" path_to_xmls= "~/LIDC-IDRI-Preprocessing/LIDC_Dataset/XML_Data/LIDC-XML-only/tcia-lidc-xml/" path_to_nrrds = "~/LIDC-IDRI-Preprocessing/LIDC_Dataset/nrrd" path_to_planars= "~/LIDC-IDRI-Preprocessing/LIDC_Dataset/planars" path_to_characteristics=r"~/LIDC-IDRI-Preprocessing/LIDC_Dataset/characteristics.csv" path_to_error_file="~s/LIDC-IDRI-Preprocessing/LIDC_Dataset/conversion_error.txt"

I tried using full path as well.

MiGoetz commented 5 years ago

I am not sure but could it be that the path_to_dicoms is wrong? Given your previous answer, it should be "/LIDC-IDRI-Preprocessing/LIDC_Dataset/Images/LIDC-IDRI"

Another problem might be that you gave absolute paths, as everything starting with a slash is interpreted as an absolute path, and it is unusual to have daat in the root folder.

Also, could you change the lines following line 60 from

paths=glob.glob(search_path)
if len(paths) > 0: return paths[0], len(paths)

to

paths=glob.glob(search_path) print(study_uid) print(series_uid) print(search_path) print(paths) if len(paths) > 0: return paths[0], len(paths)

and post the output of these lines?

shanpriya3 commented 5 years ago
Screen Shot 2019-03-21 at 4 24 12 PM

I am getting the above error

MiGoetz commented 5 years ago

It seems that the search paths are correct. Could you manually check if you have multiple dicom files in the folder ..\LIDC-IDRI-0250\1.3.6.1.4.1.14519.5.2.1.6279.6001.145271800733926000322166019837\1.3.6.1.4.1.14519.5.2.1.6279.6001.230491296081537726468075344411

Could it be that your path_to_dicoms is pointing to the wrong directory? It should point to the directory containing all patient folders, like "LIDC-IDRI-0205", "LIDC-IDRI-0206" etc...?

shanpriya3 commented 5 years ago

The path is pointing to the directory containing all patient folders, like "LIDC-IDRI-0205", "LIDC-IDRI-0206" etc... but

image

MiGoetz commented 5 years ago

Ok, it seems that the data structure is not as expected. Your example paths are completely different from the structure that the scripts expect. Did you use TCIA[1] to get the data or have you downloaded the data from a different place?

[1] https://wiki.cancerimagingarchive.net/display/Public/LIDC-IDRI#d6f67bfc35834b43a41e0e2decb32a96

shanpriya3 commented 5 years ago

Yes, I used TCIA by the link mentioned in your GitHub page.

https://wiki.cancerimagingarchive.net/display/Public/LIDC-IDRI. It seems both are same.

MiGoetz commented 5 years ago

Ok. I've checked the site again, it seems that they changed the data delivery a bit.

I guess you are using the NBIA Data Retriever to get the data? You then have to select the "Classic Directory Name" (default option is "Descriptive Directory Name") above the field where you enter the target destination. You should then obtain paths as those that I wrote you earlier. (e.g. something like ..\LIDC-IDRI-0250\1.3.6.1.4.1.14519.5.2.1.6279.6001.145271800733926000322166019837\1.3.6.1.4.1.14519.5.2.1.6279.6001.230491296081537726468075344411 )

Could you donwload the data again and then run the script again?

shanpriya3 commented 5 years ago

Sure, I will do it and update you. Thanks!

shanpriya3 commented 5 years ago

Even after downloading the data again , I am facing issues. In addition to the existing issue, there is a new issue"MitkCLDicom2Nrrd not found"'. Can you please mention the link to MITK phenotyping. The link which you mentioned is broken. So I just googled and installed it but it contains no dcm2nrrd module.

image

MiGoetz commented 5 years ago

It seems that the first problem had been solved, that's good news.

The official website is http://mitk.org/wiki/Phenotyping but I also corrected the description on github, so this sould be working now.

shanpriya3 commented 5 years ago

The first problem still exists. I am still getting no Dicom's found for xml file error. (Above screenshot)

MiGoetz commented 5 years ago

I've checked the container provided on http://mitk.org/Phenotyping - it contains the necessary programms.

Could you check if your "path_to_executables" is set correct? Also, could you please search for the MitkCLDicom2Nrrd application in your installation folder? Also, you might try to replace MitkCLDicom2Nrrd with "./MitkCLDicom2Nrrd" or "./MitkCLDicom2Nrrd.sh" and try these options (Should be in lin 84). Also applies for the other program calls.

wgs123 commented 5 years ago

tcia-lidc-xml has 6 folders containing xml files, which choose ?

MiGoetz commented 5 years ago

@shanpriya3 Do you now get results?

MiGoetz commented 5 years ago

@wgs123 Please stay in the topic of the original thread. I opened a second Issue for your comment, please use this to discuss the new topic.

shanpriya3 commented 5 years ago

@MiGoetz Not yet, the container which I installed doesn't contain MitkCLDicom2Nrrd. Something went wrong with the installation but I will reinstall it and update.

MiGoetz commented 5 years ago

@shanpriya3 Any progress so far?

hubtub2 commented 5 years ago

I guess you are using the NBIA Data Retriever to get the data? You then have to select the "Classic Directory Name" (default option is "Descriptive Directory Name")

Thank you, this solved my issue!

DujeMedak commented 5 years ago

Hello,

I have the same problem as the @shanpriya3. The error that I get looks exactly the same. I checked that the path to bin folder of MITK is correct and that it contains MitkCLDicom2Nrrd script. I downloaded the data as you said by using a "Classic Directory Name" in Data Retriever. I am using Ubuntu 18.04.2 LTS. Do you have any idea what else can I try to fix this error? In the end I copied all the data in the virual machine that has Windows and that seems to work but I am curious if there is any way to make it work on Ubuntu. Thank you !

CinKKKyo commented 4 years ago

Hello,

I have the same problem as the @shanpriya3. The error that I get looks exactly the same. I checked that the path to bin folder of MITK is correct and that it contains MitkCLDicom2Nrrd script. I downloaded the data as you said by using a "Classic Directory Name" in Data Retriever. I am using Ubuntu 18.04.2 LTS. Do you have any idea what else can I try to fix this error? In the end I copied all the data in the virual machine that has Windows and that seems to work but I am curious if there is any way to make it work on Ubuntu. Thank you !

did u figure it out so far?

DujeMedak commented 4 years ago

I am no longer using this dataset but at the time I just did this workaround with Windows virtual machine. I never managed to figure out why the program wasn't working on Ubuntu.