Code Monkey home page Code Monkey logo

Comments (3)

rii-mango avatar rii-mango commented on August 31, 2024 1

Try again. It should be fixed now. The weird edges were caused by interpolation in the overlay. The intended behavior was for interpolation to be turned off when smoothing is off -- that's how Mango works. So that part has been fixed.

If you happen to want to leave smooth display on (e.g., for the underlay), you can also now specify 'interpolation' as true or false for that overlay.

I think the reason the other map you linked do didn't show the artifact is that the overlay dimensions were an exact multiple of the underlay, resulting in no interpolation.

A related item is that turning gradation off in the color tables is now supported. That is, you can now create a color table like this:

params["luts"] = [{"name": "Custom", "gradation":false, "data":[[0, 1, 0, 0], [.5, 1, 1, 0], [1, 1, 1, 1]]}];

Normally the space between the color table "knots" is interpolated, but when setting "gradation" to false, it remains a solid color. These types of color tables might be useful for segmented data.

from papaya.

chrisgorgo avatar chrisgorgo commented on August 31, 2024

Great! Works! Thank you!

from papaya.

pangyuteng avatar pangyuteng commented on August 31, 2024

Super helpful post! Thank you both!!

Took me a while to realize you can add interpolation within the lookup table.

--

Sample snippet for those that are visiting this page.

        var params = [];
        params["images"] = ["image.nii.gz","mask.nii.gz"];
        params["smoothDisplay"] = false;
        params["interpolation"] = false;
        params["worldSpace"] = false;
        params["kioskMode"] = false;
        params["luts"] = [{
            "name": "Custom",
            "interpolation": false,
            "gradation": true,
            "data": [[0, 1, 1, 1],[0.25, 1, 0, 0],[0.5, 0, 1, 0],[0.75, 0, 0, 1],[1, 1, 1, 0]],
        }];
        params["mask.nii.gz"] = {
            "lut": "Custom",
            "alpha": 0.5,
            "min": 0,
            "max": 4,
        };
        

image

from papaya.

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.