BigDataViewer Blending Modes

Hi @bogovicj @axtimwalde @NicoKiaru @tibuch ,

I think Tobias mentioned once that you (Saalfeld) guys have an implementation of different blending modes for BigDataViewer, is that so? I guess the default is that it just sums up the values from the different channels?

We are having multiple EM data sets that we want to show on top of each other and were wondering whether there would be also some sort of averaging mode for overlaying them? Moreover, we also would like to show fluorescence data on top of this, such that we would probably need a logic of “blending groups” that are handled differently.

I think I would know how to implement this myself by building a ARGBConvertedAverageBlendingMultiEMSource< R > :slight_smile:
but in case something exists already I would of course prefer to reuse that!

Best wishes, Christian & @schorb


Adding @hanslovsky to this thread.

1 Like

You can set the AccumulatorProjectorFactory to a custom factory with the ViewerOptions.accumulateProjectorFactory method. For inspiration, I recommend you have a look at the org.janelia.saalfeldlab.paintera.composition package, in particular the
CompositeProjectorPreMultiply class.
In Paintera we do not have blending groups but we add multi-channel data as sources that provide RAI<Composite<T>> with appropriate converters into ARGB space. Downside: Changing grouping is not possible but that is not a concern for us.


I would also be interested in any code you come up with. We are interested in something similar, where we would like to take two grayscale channels, I1, and I2, and nonlinearly map them to ARGB space with a few mathematical formulas.