Giter Club home page Giter Club logo

Comments (1)

loli avatar loli commented on May 24, 2024 1

Dear potis,

the intensity standardization algorithm works by mapping the provided images to a common scale according to anchor points in their respective histograms. You provide a number of very small images (each on 12 values) with a rather hight number of landmark points (the anchor points).

The border anchor points are determined by your cutoff percentiles

numpy.array(numpy.percentile(good_trainingset[0], (1, 99)))

resulting in the anchor points

[ 0. , 8.89]

In between these two, nine further anchor points are set

numpy.array(numpy.percentile(good_trainingset[0], [10, 20, 30, 40, 50, 60, 70, 80, 90]))

which leads to

array([ 0. , 0.4, 2.3, 3.4, 4. , 4.6, 6.4, 7.8, 8. ])

As you can readily see, the left-most anchor point 0. and the subsequent one 0. fall onto the same value since good_trainingset[0] contains three zeros. Defining a linear connection between these would result in a slope of either zero or infinity, both of which are not a good idea. Therefore the error.

Using nearly as many anchor points as image pixels makes anyway not much sense. If you really must use such small images, look at the second part of error message (Another possibility would be to reduce the number of landmark percentiles landmarkp or to change their distribution.). This

irs = IntensityRangeStandardization(cutoffp=(1, 99), landmarkp=[25, 50, 75], stdrange='auto')
irs.train_transform(good_trainingset,surpress_mapping_check=True)

works, for example.

Regarding the background part of the message: MedPy is developed to work with medical images. These scans often have a large, mostly zero-valued background denoting air surrounding the body area scanned. This should be removed before the intensity range standardization. See here for an example.

I hope this helps you.

Best,
loli

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.