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.16k stars 499 forks source link

could not pass parameters into pyradiomics [FEAT EXTRACTION] #526

Closed Mathematinho closed 5 years ago

Mathematinho commented 5 years ago

Describe the bug I was trying to pass the force2D keyword arguments into pyradiomics. But it seems not making any difference in the output. I still see all the 3D shape features and don't see the 2D shape features.

i tried both hard-code and using a parameter file follow the code from https://www.radiomics.io/pyradiomicsnotebook.html

neither worked.

my guess was the parameter was not passed into featureextractor. In fact, i wasn't able to print the default settings. you can see that in the screen grab below.

Capture

Version (please complete the following information):

Thanks.

JoostJM commented 5 years ago

@Mathematinho,

That notebook represents a very old version of PyRadiomics (check the output, it containts the version: 1.0-post17)

As to the enabled settings, that variable is now called settings, similarly, enabled filters is now enabledImagetypes. Enabled features/classes are still in enabledFeatures.

Finally, setting force2D=True does not automatically switch your shape features to 2D, it is intended to deal with voxel anisotropy (by ignoring offsets in the slice direction, requiring only isotropic size in-plane).

For extracting in 2D (single slice, including 2D shape features): disable class shape and enable class shape2D, set force2D=True. Note that this only works if your segmentation also represents just 1 slice.

Finally, the settings that were enabled are also part of the standard diagnostic features in the output: diagnostics_Configuration_Settings

Mathematinho commented 5 years ago

thank you @JoostJM. problem solved.