Closed tischi closed 3 years ago
It works! This is code that I wrote a long time ago for bdv-playground.
Amazingly beautiful, imho:
let's add the optional field: "blendingMode" (with "sum", "average", "occluding" ). in my code it will default to "sum".
That looks awesome! Which blending mode is it in the image you show?
I will add it to the spec later.
Is this compatible with the current BDV-PG implementation? Would it also support the additional XML fields that define channel/LUT, contrast settings etc.?
Also, I just learned of BetaSeg a segmentation overlay for BDV which includes amazing features. Have you chatted with Deborah about that? There is a lot of intersection with the MoBIE way of showing segmentations, but it also includes interactive features that we might want to look into...
This is average mode.
@martinschorb @NicoKiaru
I was looking at the code in the playground and I think actually the choices are:
Avg
AvgOccluding
Sum
SumOccluding
Is this compatible with the current BDV-PG implementation? Would it also support the additional XML fields that define channel/LUT, contrast settings etc.?
It is the same implementation, but we read the fields from our JSON specs. Currently there are sill two ways of specifying this (the playground XML and the MoBIE JSON). We could think of writing a converter between the xml and the JSON; @martinschorb maybe you'd be interested?
Also, I just learned of BetaSeg a segmentation overlay for BDV which includes amazing features. Have you chatted with Deborah about that? There is a lot of intersection with the MoBIE way of showing segmentations, but it also includes interactive features that we might want to look into...
Unfortunately the communication there is not as good as I would wish. We chatted about it at one hackathon and agreed to join efforts, but then nothing happened after that. Probably a lot of code duplication by now.
We chatted about it at one hackathon and agreed to join efforts, but then nothing happened after that. Probably a lot of code duplication by now.
In fact, a better way of saying this is that probably they caught up in the last 2-3 years, because I did not change much on my side on that part of the code. If their stuff is good, we should probably use it. Something to look at later this year.
Their UI frontend looks really cool. I saw a video in a presentation where you can switch on and off individual objects based on properties (distances, size,...) right from the viewer.
We could think of writing a converter between the xml and the JSON; @martinschorb maybe you'd be interested?
@constantinpape can you point me to the code that does the JSON? I have these properties in a dict, so conversion should be easy.
Their UI frontend looks really cool. I saw a video in a presentation where you can switch on and off individual objects based on properties (distances, size,...) right from the viewer.
Great, then we can think about this (in a few months I would say :) But this is not what this issue is about :)
@martinschorb Could you please comment on the blending modes?
Avg
AvgOccluding
Sum
SumOccluding
Are those the ones that we should have?
Oh wow! That looks really a nice way to see the tomogram and segmentation within the larger context! (Just for displaying purposes though that one cell has the cell wall detaching, the neighboring ones look better 😅)
Are those the ones that we should have?
I don't know the exact difference between the occluding types and if they could be combined or if maybe some layer concept would be better. But yes, that's what works nicely in BDV-PG.
In fact, a better way of saying this is that probably they caught up in the last 2-3 years, because I did not change much on my side on that part of the code. If their stuff is good, we should probably use it. Something to look at later this year.
I guess it is this... correct?
I guess it is this... correct?
Yes, but could we please have this discussion in a new issue. You could open one, about checking whether integration with this is feasible.
@constantinpape OK, let'd go for those ones for now:
avg
avgOccluding
sum
sumOccluding
Thanks!
It works! This is code that I wrote a long time ago for bdv-playground.
Amazingly beautiful, imho:
![]()
let's add the optional field: "blendingMode" (with "sum", "average", "occluding" ). in my code it will default to "sum".
Oh la la !!!! it's amazing!
@constantinpape can you point me to the code that does the JSON? I have these properties in a dict, so conversion should be easy.
I think I found it.
My suggestion is to add a check in add_to_image_dict
whether the XML contains these extra information and then write it into the image_dict
. Or would you rather prefer to have it as a separate function that imports these things?
what colors are supported by MoBIE? I found these base colors, but there are some more apparently. Where are these defined? https://docs.oracle.com/javase/7/docs/api/java/awt/Color.html
randomFromGlasbey
is only used by MobIE (google finds nothing else...)
@tischi Do we need the blendingMode
only for imageDisplay
or also for segmentationDisplay
?
@giuliamizzon
(Just for displaying purposes though that one cell has the cell wall detaching, the neighboring ones look better sweat_smile)
Yes, this is just a very quick segmentation I did for the example, so there are certainly a few errors in there.
@martinschorb I have made a separate issue for discussing the bdv playground things, see #27.
randomFromGlasbey
is only used by MobIE (google finds nothing else...)
Yes, this is a special coloring mode for images, where the color map should be picked according to glasbey. (we introduced it for the prospr images in the platybrowser)
@tischi should we call it projectionMode
to be consistent with playground?
See https://github.com/mobie/mobie.github.io/issues/27#issuecomment-808239600
Do we need the blendingMode only for imageDisplay or also for segmentationDisplay?
Not sure yet, for now only add it to imageDisplay
should we call it projectionMode to be consistent with playground?
I am right now on it to change this in playground to also be blendingMode
; I think that is better.
@NicoKiaru do you agree? I think that's also how they call it in napari.
Ok, I have added blendingMode
for imageDisplay
now, see 257b97d7297e1dfaddf9a65d86a324322b54417a
@martinschorb @K-Meech @constantinpape We should add a field
blendingMode
to theimageDisplay
. These are the current choices:I will add myself to the current test data set manually to explore it.