mobie / platybrowser-project

7 stars 5 forks source link

Prospr coloring doesn't work as expected #69

Closed constantinpape closed 3 years ago

constantinpape commented 4 years ago

All prospr volumes are currently added with a white color map, see

prospr-colors

Instead, they should be added with a random color map drawn from glasbey. This is specified by the color name randomFromGlasbey, see https://github.com/mobie/platybrowser-datasets/blob/master/data/1.0.1/images/images.json#L15

This used to work. Is this maybe related to #68?

tischi commented 4 years ago

This should have stopped working a long time ago, when we introduced the new Bookmark parsing. I added new code to fix it:

        ARGBType argbType;
        if ( metadata.color.equals("RandomFromGlasbey") )
        {
            final GlasbeyARGBLut glasbeyARGBLut = new GlasbeyARGBLut();
            final int argb = glasbeyARGBLut.getARGB( createRandom( metadata.imageId ) );
            argbType = new ARGBType( argb );
        }
        else
        {
            argbType = ColorUtils.getARGBType( metadata.color );
        }

        if ( argbType != null ) bdvStackSource.setColor( argbType );
constantinpape commented 4 years ago

This should have stopped working a long time ago, when we introduced the new Bookmark parsing.

Yes, quite possible that we overlooked this for some time.

K-Meech commented 4 years ago

Yes - I haven't checked the bookmarks in a long time either - so could easily have changed a while ago.

constantinpape commented 3 years ago

This is working now.