AIM-Harvard / pyradiomics

Open-source python package for the extraction of Radiomics features from 2D and 3D images and binary masks. Support: https://discourse.slicer.org/c/community/radiomics
http://pyradiomics.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.14k stars 492 forks source link

[FEAT EXTRACTION] Multiframe Dicom seg #687

Open ctzavaras opened 3 years ago

ctzavaras commented 3 years ago

Greetings,

I am using pyradiomics in order to extract radiomics using as input DCE-MRIs and as mask multi-frame dicom segs (both 3D)that are provided with the dataset. I convert dcm files to nrrd using Simpleitk. The issue is that I am getting different values when I am using pyradiomics through Slicer extension and when I use pyradiomics in a python script(In both cases, I use the same settings and CorrectMask = True). Also, I used Slicer to view the MRIs and the Seg files and it seems that Slicer is applying correct the segmentation to MRI sequence. The masks have less frames than the original sequence(For example, the MRI has 60 slices but the corresponding mask has 22 frames). I Searched the Metadata of the seg files and about the geometry I found only Image Orientation and Image position(Patient) until now. I couldn't find anything relevant to Segment_Extent. So I was wondering if there is a way to check how pyradiomics aligns the mask to the input image, in order to correct this mismatch of the values? Or if I can find out which information pyradiomics needs from seg's metadata in order to apply the alignment? Lastly, if I export the segment through slicer and the new nrrd seg file contains the segment extent in the metadata, so I tried to use the new Seg as mask in python script and I got the same values as when I extract features from Slicer.

Thank you in advance! Chris

Version (please complete the following information):

fedorov commented 3 years ago

I am not sure SimpleITK has robust readers for those types of DICOM.

I recommend you use dcm2niix for converting DCE MRI to NRRD, and dcmqi for converting DICOM SEG to NRRD.

ctzavaras commented 3 years ago

@fedorov I will try both. But the weird thing is that there is no problem when I use my nrrd files in Slicer. Also I used pydicom and pydicom_seg in order to check the metadata in dcm files and still I found the same information about geometry. Thank you!

ctzavaras commented 3 years ago

@fedorov Hello again!! I did some tests with dcmqi but I get same results by using SimpleITK. Still after some tests I found out that there are cases that values from slicer and python script are the same, but also there are some cases were still the values differ. For example:

As you can see in the example above even the Bounding box after the mask correction has different values. Do you have any clue why this mismatch occurs? Also, which from the two methods should I trust?

Thanks in advance!