Giter Club home page Giter Club logo

Comments (4)

loli avatar loli commented on May 25, 2024

This might well be the expected behavior. To avoid information loss, the method stretches the intensity range. There's no mechanism to force a passive range. If you require positive values, you can simply shift them by the global min.

You might want to take a look if the resulting transformed images look correct. Is that the case?

And are the original image values all positive or bound between 0 and 255? What are the global min and max values over ask images? I don't remember how Bjorn published his data right now. Although this doesn't really matter.

from medpy.

lazypoet avatar lazypoet commented on May 25, 2024

Though the original image has a far greater range than just 0-255, the mask that I used ensures that the data is positive(you can see that in the code). Also, why would the method stretch it into negative if you are using auto? But yes, the transformed images do look okay.

from medpy.

loli avatar loli commented on May 25, 2024

You are using the L4 percentile model. It's defined as
L4 = [10, 20, 30, 40, 50, 60, 70, 80, 90]

The linear slope between the 10 and 20 percentile is applied to the lower outlier values. If it is steep enough, this might result in negative values.

At this short glance into the code I can't be sure, but you might achieve the desired effect with the model

[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]

If that makes sense I can't say.

from medpy.

lazypoet avatar lazypoet commented on May 25, 2024

Okay, but listen to this. I was using SimpleITK to read the images. As you might know, for some reason(high dynamic range?), the images read by SimpleITK have intensity values in the range of upto a few thousands. Now, when I ran your method on those, the negative values go as much as -3000 or even more. I don't know if the slope can be that much

from medpy.

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.