# Radiomics entropy=0?

**URL:** <https://discourse.slicer.org/t/radiomics-entropy-0/5583>\
**Category:** Support\
**Tags:** radiomics\
**Created:** [January 30, 2019, 6:12pm UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583 "2019-01-30T18:12:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![carba86](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carba86/32/3943_2.png) [@carba86](https://discourse.slicer.org/u/carba86)\
**Post date:** [January 30, 2019, 6:12pm UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/1 "2019-01-30T18:12:02Z")

</div>

Hi, a quick question.

No matter if I study a label after segmenting the largest cross section of the image or the tumor volume, I keep getting Entropy = -0.0 with Radiomics.

Any tip?  
Thanks.  
Leandro.

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [February 6, 2019, 1:55pm UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/2 "2019-02-06T13:55:11Z")

</div>

@carba86 Is that the firstorder Entropy? If so, what are the values for firstorder:Range and the value for the setting “binWidth” you used during extraction?

An entropy of 0 usually points to a ‘flat region’, i.e. all voxels have the same gray value AFTER DISCRETIZATION, this can be caused in a situation where the range of grayvalues is (much) smaller than the binwidth, causing all voxels to belong to the same bin: i.e. same grayvalue and a ‘flat region’

Regards,

Joost

---

<div class="post-metadata">

**Author:** ![carba86](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carba86/32/3943_2.png) [@carba86](https://discourse.slicer.org/u/carba86)\
**Post date:** [April 17, 2019, 1:14pm UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/3 "2019-04-17T13:14:42Z")

</div>

Thanks Joost and sorry it’s taken me a while to write you back. Analyzing numbers obtained with Radiomics, I see that this inconsistency does not only happen with Entropy but with other features as well, firstorder specially. I attach screen captures of Radiomics settings and numbers obtained (each column representing a different patient).

I look forward to hearing from you guys, you are always of great help.

 ![Snip20190417_2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/9/a9cef964e20a7db894ee76307b717538201c8a38.png)

 ![Snip20190417_1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/5/751346ffedd478c73a2d2d8a9a40bd73c6ed5e24.png)

 ![Snip20190417_3](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/6/4605cc3a87913a47851f64eb429e3b74dbaf8a8f.jpeg)

 ![Snip20190417_4](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/1/c1ce3f5f19d4c078496f942ab57699630543a1cc.jpeg)

Kind regards,  
Leandro.

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [April 18, 2019, 8:01am UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/4 "2019-04-18T08:01:13Z")

</div>

The entropy 0 is indeed caused by a too-large bin width (set to 25 in your case). Many of your scans show a lot lower range (max ~4, range \< 5). This will result in flat regions.

Moreover, some of your scans are VERY different (e.g. max ~15,000), which, as predicted, do not result in entropy = 0.

My advise would be to use a parameter file and enable normalization with an adapted bin width. See more on customizing the extraction and the parameter file in [pyradiomics’ documentation](https://pyradiomics.readthedocs.io/en/latest/customization.html)

---

<div class="post-metadata">

**Author:** ![carba86](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carba86/32/3943_2.png) [@carba86](https://discourse.slicer.org/u/carba86)\
**Post date:** [April 19, 2019, 7:07pm UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/5 "2019-04-19T19:07:40Z")

</div>

Thanks Joost once again.  
Do you think binwidth setting will correct other discrepancies I see for example in ngtdm or glcm ?

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [April 23, 2019, 7:56am UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/6 "2019-04-23T07:56:38Z")

</div>

Yes, although I also advise to enable normalization, as the range in some of your images is very, very large, compared to most of your other images.

---

<div class="post-metadata">

**Author:** ![carba86](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carba86/32/3943_2.png) [@carba86](https://discourse.slicer.org/u/carba86)\
**Post date:** [April 27, 2019, 12:12am UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/7 "2019-04-27T00:12:39Z")

</div>

Hi Joost, by adapted binwidth do you mean something like this? (my data are MR images, 3D volumes with apron 1 mm slice thickness)

imageType:  
Original: {}

featureClass:  
shape:  
firstorder:  
glcm:  
glrlm:  
glszm:  
gldm:

setting:  
normalize: true  
normalizeScale: 100  
interpolator: ‘sitkBSpline’  
resampledPixelSpacing: [1, 1, 1]  
binWidth: 5  
dynamicBinning: true  
voxelArrayShift: 300  
label: 1

---

<div class="post-metadata">

**Author:** ![carba86](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carba86/32/3943_2.png) [@carba86](https://discourse.slicer.org/u/carba86)\
**Post date:** [April 27, 2019, 1:16am UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/8 "2019-04-27T01:16:02Z")

</div>

One more thing, I get to different scenes (values of firstorder:range) depending on how I normalize my original images. Which would be the correct option?

1. **NORMALIZING WITH THE SIMPLE FILTER EXTENSION IN 3DSLICER**

 ![Snip20190426_40](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/1/d161c12d8e1577b6140b5e236afde6b3b5b43573.png)  
 ![Snip20190426_39](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/0/d03e52c244bbe21b456877f20df2e2357e194b04.png)

1. **NORMALIZING WITH PARAMETER FILE**

 ![Snip20190426_43](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/4/846f55221018e7150e200177a4008026df493149.jpeg)

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [April 29, 2019, 11:29am UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/9 "2019-04-29T11:29:33Z")

</div>

Out of your provided examples, I’d say go for method 2. Using it this way also includes the additional scaling factor (100) which is matched to the binwidth of 5. If you want to use Slicer’s normalization, update the binwidth to 0.05.

As to your parameter file. That looks fine to me. The only comment I have is that parameter `dynamicBinning` will not be accepted, as it is not part of the master branch of PyRadiomics and therefore also not part of the Radiomics module.

---

<div class="post-metadata">

**Author:** ![carba86](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/carba86/32/3943_2.png) [@carba86](https://discourse.slicer.org/u/carba86)\
**Post date:** [May 8, 2019, 1:27pm UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/10 "2019-05-08T13:27:49Z")

</div>

Do you recommend using a binwidth of 5 although range in scene 2 is aprox\<350?

---

<div class="post-metadata">

**Author:** ![JoostJM](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/joostjm/32/1091_2.png) [@JoostJM](https://discourse.slicer.org/u/JoostJM)\
**Post date:** [May 8, 2019, 2:12pm UTC](https://discourse.slicer.org/t/radiomics-entropy-0/5583/11 "2019-05-08T14:12:46Z")

</div>

@carba86 yes, I generally try to aim for a compromise that results in about 10-100 bins for the bulk of the cases in the dataset.
