Find for help for extraction radiomics features with nii image

408 views
Skip to first unread message

李卓然

unread,
May 26, 2018, 6:13:22 AM5/26/18
to pyradiomics
Dear groups:
     I used your great toolkit pyradomics to exam in a example in following:

from radiomics import featureextractor,getTestCase
import six
import sys, os
dataDir = '/usr/kzhao/MCAD/useful_tool/pyradiomics-master'
imageName, maskName = getTestCase('brain1', dataDir)
print(imageName)
print(maskName)
params = os.path.join(dataDir, "examples", "exampleSettings", "Params.yaml")
print(params)
extractor = featureextractor.RadiomicsFeaturesExtractor(params)
# print(extractor)
result = extractor.execute(imageName, maskName)

but my data is nii mri data, I test for much times ,but no a right results. So can you help me, how to change your toolkit in python scirpt. 

          Thank you and very best.
         Yours 
                                                                           Kunzhao-Brainnetome

Joost van Griethuysen

unread,
May 28, 2018, 4:04:01 AM5/28/18
to pyradiomics
Dear Kunzhao,

what do you mean with 'not right'? Could you attach a logfile generated using level DEBUG. It usually contains a lot of information pointing out what's going wrong.

Regards,

Joost

Op zaterdag 26 mei 2018 12:13:22 UTC+2 schreef 李卓然:

Carlos Martín

unread,
Jun 5, 2018, 4:35:24 PM6/5/18
to pyradiomics
I am experimenting weird results also. I have nifti files for MR and segmentation of 3 regions. I am not able to generalize the model with weird results. My question is, if I have 3 segmentations, should I receive in the extraction all the features for each of the three regions? For example,
3 times this:
        "original_shape_Flatness": 0.4068389581378348,
        "original_shape_Sphericity": 0.6573231032731822,
        "original_shape_Elongation": 0.8070320951604483,
        "original_shape_Maximum3DDiameter": 102.09750444385826,
        "original_shape_LeastAxis": 40.01589566100229,
        "original_shape_SurfaceArea": 23930.336831353965,
        "original_shape_MajorAxis": 98.35807230497608,
        "original_shape_SurfaceVolumeRatio": 0.1289981362079858,
        "original_shape_Maximum2DDiameterRow": 101.88531703243191,
        "original_shape_MinorAxis": 79.37812116822771,
        "original_shape_Maximum2DDiameterSlice": 96.06168601222083,
        "original_shape_Maximum2DDiameterColumn": 84.52082171308713,

Kim O

unread,
Jun 13, 2018, 4:05:35 PM6/13/18
to pyradiomics
Hi Carlos, 

How did you get any output with .nii files? 
I have .nii.gz and can't seem to make it work. Thanks!

Andrey Fedorov

unread,
Jun 14, 2018, 11:04:54 AM6/14/18
to pyradiomics
Sorry for the delayed replies!

Carlos: if you have multiple labels in your segmentation file, my understanding is that you will need to run extractor for each individual label. By default, the label value that will be used is 1. This is if I traced the code correctly. I am sorry, it is indeed not obvious from the documentation. We should clarify this.

Kim O: .nii.gz should work just fine. If it doesn't work, most likely the cause of the problem is in something else. Please provide the error log so we can understand what is going on.
Reply all
Reply to author
Forward
0 new messages