# Discrepancy between segmentation threshold and first order radiomics

**URL:** <https://discourse.slicer.org/t/discrepancy-between-segmentation-threshold-and-first-order-radiomics/20374>\
**Category:** Support\
**Tags:** segmentation, dicom, radiomics\
**Created:** [October 26, 2021, 10:58pm UTC](https://discourse.slicer.org/t/discrepancy-between-segmentation-threshold-and-first-order-radiomics/20374 "2021-10-26T22:58:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabio\_Nunes](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fabio_nunes/32/12804_2.png) [@Fabio\_Nunes](https://discourse.slicer.org/u/Fabio_Nunes)\
**Post date:** [October 26, 2021, 10:58pm UTC](https://discourse.slicer.org/t/discrepancy-between-segmentation-threshold-and-first-order-radiomics/20374/1 "2021-10-26T22:58:15Z")

</div>

Hello,

Thanks to the advice of Mr. [Andras Lasso](https://discourse.slicer.org/u/lassoan), I’ve been able to segment the pericardium of the heart (using the Surface Cut option from Slicer). I’ve then applied a threshold to only select the fatty tissue (HU -150 to -50) and it is corretly identified as green pixels on the attached image.  
I’ve also checked that this segmentation was correct looking at the label statistics. However, once I run the radiomics on this segment, I noticed that the first order minimum was -346 and the maximum was 73 (outside the range of my initial threshold).

Is this normal? What could cause this difference?  
Thank you

 ![Imagem2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/e/2ec4f619014f322b28b706d55d6b88e1e674de19.jpeg)

---

<div class="post-metadata">

**Author:** ![Fabio\_Nunes](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fabio_nunes/32/12804_2.png) [@Fabio\_Nunes](https://discourse.slicer.org/u/Fabio_Nunes)\
**Post date:** [October 26, 2021, 11:43pm UTC](https://discourse.slicer.org/t/discrepancy-between-segmentation-threshold-and-first-order-radiomics/20374/2 "2021-10-26T23:43:39Z")

</div>

Perhaps I’ve found the solution.  
I’ve been playing with the options and I’ve noticed that:

- when I resample with resampled voxel size 2,2,2 → the result is what is seen above
- when I do not resample → the first order minimum and maximum are exactly -150 and -50

---

<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:** [January 11, 2022, 12:17pm UTC](https://discourse.slicer.org/t/discrepancy-between-segmentation-threshold-and-first-order-radiomics/20374/3 "2022-01-11T12:17:46Z")

</div>

Sounds like the issue indeed. A potential fix is enabling the resegmentationRange in PyRadiomcs this excludes voxels outside the specified range and works like thresholding, but is applied after resampling.
