Giter Site home page Giter Site logo

Comments (11)

JoostJM avatar JoostJM commented on May 18, 2024 1

After a quick view and test today, I think the new features are in labelshape statistics. Also max3Ddiameter and volume are in there. The rest of the features (with the exception of surface area) are simple calculations that are based on volume and surface area.
Just one problem so far, I can't find simple ITK's equivalent of surface area
there is a function that calculates the perimeter, but this is a distance, not a surface. (And very different from the matlab code anyhow, by about 30%).

from pyradiomics.

JoostJM avatar JoostJM commented on May 18, 2024

I have tested the use of LabelShapeStatisticsImageFilter.GetFeretDiameter (which should be equal to max3Ddiameter), this worked. Additionally, I discovered the cause of the differences between matlab and pyradiomics, it is due to a bug in the pyradiomics code, after the fix, the pyradiomics code was also computing the correct distance.

from pyradiomics.

JoostJM avatar JoostJM commented on May 18, 2024

The differences between surface area calculated in matlab and pyradiomics are very large (+/- 500), so there is a bug somewhere probably.
swapping around pixelspacing does not have a large effect, so not solely responsible for large differences.
image

from pyradiomics.

fedorov avatar fedorov commented on May 18, 2024

Thanks for checking! Let's keep thinking about this.

from pyradiomics.

JoostJM avatar JoostJM commented on May 18, 2024

@fedorov currently working on a slightly different implementation to count voxel faces, will update...

from pyradiomics.

JoostJM avatar JoostJM commented on May 18, 2024

@fedorov good news, my revision drastically reduced the size of the error. still 15-30% though

image

I think the differences are now more likely to be explained as due to the different type of defining the surface...

from pyradiomics.

fedorov avatar fedorov commented on May 18, 2024

Can you make a synthetic example where we know the actual surface area, and add this as a regression test?

from pyradiomics.

JoostJM avatar JoostJM commented on May 18, 2024

@fedorov I'll try, should be possible. How about a sphere, radius 10mm, in sitk image of [1,1,1] spacing?

from pyradiomics.

fedorov avatar fedorov commented on May 18, 2024

I would start with a cube, and test with isotropic spacing, then with different slice thickness, then if those tests pass, maybe make a star-like shape, or something with slowly increasing level of complexity, but still manageable to calculate true answer manually.

I have to admit, I can't calculate voxelized surface area of a sphere in my head! :-(

from pyradiomics.

JoostJM avatar JoostJM commented on May 18, 2024

Good idea!

from pyradiomics.

JoostJM avatar JoostJM commented on May 18, 2024

Resolved by #138

from pyradiomics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.