Use Pyradiomics for feature extraction on 2D US (Ultrasonic) pictures ?

660 views
Skip to first unread message

Andy Wang

unread,
May 21, 2019, 8:55:53 PM5/21/19
to pyradiomics
I Plan to do use Fiji/ImageJ to do segmentation on my Ultrasonic Picture, and export to nrrd file for pyradiomics to extract features  , and then to do radiomics related research.  

Basically, I do segmentation on Fiji, and use stack to make it 3D , and save as nrrd format. then I use pyradiomics to extract features. 


My concern is whether pyradiomics is ideal for feature extraction to a 2D ultrasonic picture ? pyradimocs can be used for MRI,PET-CT,CT as said in the document  , but How about Ultrasonic 2D picture ?

any thoughts /suggestion ?


Thanks 


Joost van Griethuysen

unread,
May 22, 2019, 9:01:12 AM5/22/19
to pyradiomics
Hello Andy,

Recently we've updated PyRadiomics to allow also truly 2D input. You don't have to make a stack anymore. Furthermore, most featureclasses allow both 2D and 3D input without detracting from the meaning and validity of the feature values. The only exception here is shape, but we've addressed that by adding a new feature class, shape2D, to generate features for 2D input.

Regards,

Joost

Andy Wang

unread,
May 22, 2019, 9:54:46 AM5/22/19
to pyradiomics
thanks a lot. sounds great. 

Oganes Ashikyan

unread,
May 23, 2019, 2:21:00 PM5/23/19
to Andy Wang, pyradiomics
How are you planning to create 3d volume from 2d ultrasound images? You need to know each slice "thickness" which is impossible unless you started with a mechanical arm ultrasound and somehow standardized your slices. Having said that, not all radiomic features require 3d data. You can do majority on each 2d image. But, your output is specific to that single 2d image. Hope this helps,




--
You received this message because you are subscribed to the Google Groups "pyradiomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyradiomics...@googlegroups.com.
To post to this group, send email to pyrad...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyradiomics/be93fcbd-fb06-4aaa-ac16-d2f5d2840eaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Epimack Michael

unread,
Jun 24, 2019, 8:10:36 AM6/24/19
to pyradiomics
Helow Andy Wang,did you manage  to extract features? and how do segment your image through Fiji can please share your experience  as i working with multi modality

Ankita Singh

unread,
Jun 24, 2019, 8:48:01 PM6/24/19
to pyradiomics
Hi Epimack,

I use ImageJ (or Fiji) on a regular basis and sometimes, use it for segmentation (mainly binarization). 
If that's what you are looking for here is the workflow:

1) Load the image you want to segment.
2) Apply noise filters (if necessary)
    - Process > Filters > Choose which filter you would need
3) Segment the image
    - Process > Make Binary > Choose the Method you want to use (eg Otsu) > You might also want to check 'Calculate threshold for each image' > Ok

You will obtain your segmented image and export it as an nrrd file.

Hope this helps.
Ankita

xiong zhang

unread,
Dec 9, 2019, 9:33:25 PM12/9/19
to pyradiomics
there was one problem, my Ultrasonic pictures are png format,  they are RGB, that is not 2-d images. So what can i do to transform pictures to nrrd files. 



在 2019年5月22日星期三 UTC+8上午8:55:53,Andy Wang写道:
Message has been deleted

Joost van Griethuysen

unread,
Dec 10, 2019, 1:30:15 AM12/10/19
to pyradiomics
If you were not able to extract features, what was the error given? Can you share the log?
Did you visually check (in 3D Slicer) if your mask correctly corresponds to your image?

Regards,

Joost

Op dinsdag 10 december 2019 05:22:21 UTC+1 schreef Epimack Michael:
I have encountered the same problem, and i have try to convert my png image from RGB to single channel and use 3D slicer to convert from png to nrrd,but i was not able to extract features. Hope your answer will help us,as accessing the Dicom image it very challenging.
Thank you.

--
You received this message because you are subscribed to the Google Groups "pyradiomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyradiomics+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyradiomics/a72828f1-2824-4b8c-871f-770371ba5951%40googlegroups.com.
--

Eng.Epimack M.Pius, Meng,
Assistant Lecture,Electrical Engineering Department
Dar es salaam Institute of Technology
Junction of Bibi Titi Mohamed/Morogoro Road,
Dar es salaam-Tanzania
Cell +255658543500
       +255769234469
         epimac...@dit.ac.tz

Renato Cuocolo

unread,
Dec 10, 2019, 2:30:58 AM12/10/19
to pyradiomics
I had a similar issue and was able to solve it by converting the RGB vector to a grayscale PNG using the PIL python package.
PyRadiomics should not have any issues with PNG files, I used them for botht the image and mask in the case of US exams.

Renato Cuocolo

unread,
Dec 10, 2019, 4:33:11 AM12/10/19
to pyradiomics
As it was requested privately, I am linking the documentation for the commands I used for the conversion if someone with similar issues finds the discussion: https://pillow.readthedocs.io/en/3.1.x/reference/Image.html

Joost van Griethuysen

unread,
Dec 10, 2019, 4:59:46 AM12/10/19
to pyradiomics
Hello Micheal,

I have tested the images you sent. I discovered the following:
- breast1_image.nrrd is different from the PNG images (it is in fact a MRI of the breast)
- breast1_label.nrrd is in fact an image, not a label map (looks to be the same as breast1.nrrd)
- Both breast1_image.png and grayscale.png are already grayscale png images and can be used in pyradiomics
- breast1_label.png and groundtruth.png are identical. However, be aware that label 255 is used to identify your ROI
- breast1_image.png and breast1_label.png have slightly different sizes (769x574 vs 775x580), was the segmentation made on this image or a different one? The overlap seems fair in 3D slicer.

The following command provided results for me:

pyradiomics breast1_image.png breast1_label.png -s label:255 -s correctMask:True

Regards,

Joost

Op dinsdag 10 december 2019 07:30:15 UTC+1 schreef Joost van Griethuysen:

Epimack Michael

unread,
Dec 15, 2019, 8:45:54 AM12/15/19
to Joost van Griethuysen, pyradiomics
Good day Dr.Joost.
Thank you for  tips regarding my images.  I have extracted some features, but  I did not manage to extract GLCM(all features are written NAN), also I did not manage to extract shape2D features, while force2D=True and force2Dimension=0,However the documentation require force2Dextration=False but I don’t know where to set this setting. In addition, for first order feature,
standard deviations is missing and for Shape feature maximum
2D diameter is missing.
Sorry for long story.

To unsubscribe from this group and stop receiving emails from it, send an email to pyradiomics...@googlegroups.com.
--

Eng.Epimack M.Pius, Meng,
Assistant Lecture,Electrical Engineering Department
Dar es salaam Institute of Technology
Junction of Bibi Titi Mohamed/Morogoro Road,
Cell +255658543500
       +255769234469
         epimac...@dit.ac.tz

--
You received this message because you are subscribed to the Google Groups "pyradiomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyradiomics...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyradiomics/1605168d-c8f9-40e8-a29b-e7563231432f%40googlegroups.com.

Joost van Griethuysen

unread,
Jan 28, 2020, 4:46:43 AM1/28/20
to pyradiomics
Can you extract using the commandline and enable logging? If you can share the log, this would greatly help to track down the issue.
Additionally, what are the results of the diagnostic features?

Regards,

Joost

Op zondag 15 december 2019 14:45:54 UTC+1 schreef Epimack Michael:
To unsubscribe from this group and stop receiving emails from it, send an email to pyradiomics+unsubscribe@googlegroups.com.
--

Eng.Epimack M.Pius, Meng,
Assistant Lecture,Electrical Engineering Department
Dar es salaam Institute of Technology
Junction of Bibi Titi Mohamed/Morogoro Road,
Cell +255658543500
       +255769234469
         epimac...@dit.ac.tz

--
You received this message because you are subscribed to the Google Groups "pyradiomics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyradiomics+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages