Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Multiple-scene overlapped area rendering #25

Closed
stanleyycho opened this issue Apr 9, 2018 · 5 comments
Closed

Multiple-scene overlapped area rendering #25

stanleyycho opened this issue Apr 9, 2018 · 5 comments

Comments

@stanleyycho
Copy link

Hello,

I have a question regarding tile accessor to read multiple scene image. I have an image, sorry that I cannot share it. The tiles and scene is arranged as below figure. The red boundary is scene boundary, the blue area are the tiles and the green are tiles within overlapped area of 2 scene.

The issue I have is that CSingleChannelTileAccessor can render the green areas with tissue. However; when I use CSingleChannelPyramidLevelTileAccessor to render subsampled images. The green areas become background black pixels, which are copied from background of lower right scene.

I read the source code and, in the end, both classes call Compositors::ComposeSingleChannelTiles. I am wondering how it actually works here. How does the 2 methods determine which tile to render and why I got different results using these two classes.

Thank you.

image

@zeissmicroscopy
Copy link
Collaborator

Not sure if I understand your point correctly, however - there is an issue when we have two overlapping scenes and render a minified bitmap. Say, we have this arrangement
scene_1
(blue are subblocks of scene 1, and red is scene 2). Now, while on pyramid-layer-0 (the highest-res bitmaps) the subblocks do not overlap and there is no issue when composing them, there is a problem if using pyramid-layers. Pyramids are per scene in CZI, and they will very well overlap (as in this example, the uppermost pyramid-layer may only be a single subblock, covering the whole area of the scene). The way CZI deals with this is to include "a mask" with each subblock, which is used to have "alpha-information" for each pixel. Unfortunately (see section "Todos" in the documentation) - this is currently not supported in libCZI. An alternative approach would be to use pyramid-layer-0 subblocks in order to determine the geometry of "valid pixels" and use this geometry when composing different scenes - which will only work if there are no "non valid pixels" on layer 0.
So, if I did not misunderstand your issue, I am sorry, but you hit a loose end of libCZI.

@stanleyycho
Copy link
Author

Thank you for explaining. I want to clarify one thing. Did you mean that when I request image from top pyramid layer, the sub block holds the image, which is composed of blue and red areas without taking into account of the overlapping issue?
Thanks.

@zeissmicroscopy
Copy link
Collaborator

Yes, I suppose. Just to be clear - in the above example we have two subblocks (when we request the "top level pyramid", since pyramids are per scene), and when those two subblocks are composed, the "overlapping issue" is not taken into consideration. Where "taking into consideration" would mean: use the "mask-information" (if present), use the "geometric information" (from layer 0), or some other kludge one could think of (like color-keying).

@stanleyycho
Copy link
Author

Thank you for clarification!
Is there any plan to implement the feature in near future?

@ptahmose
Copy link
Contributor

Sorry, I suppose the answer is no.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants