Draw Weighted Line In ImgLib2

Hi,
Apparently there’s no way to draw a weighted line in ImgLib2, other than wrapping the image to ImagePlus of ImageJ (or am I missing something)?

So, how does one flatten an Image in ImageJ after adding an overlay? because when I do this, I lose other images of the stack?

For those who are interested in this question,
The only solution I have found thus far is to wrap my image into an ImagePlus of ImageJ1.x,
then define Line (ROIs), then define an overlay with that, then add that overlay to the image,
then flatten the image, then wrap it back to ImgLib2.

And if you’re getting a headache reading this, image how long it took me to figure all this out :smiley:

Look forward to your more straightforward solutions!