These are chat archives for bigdataviewer/bigdataviewer-core

19th
Oct 2017
tpietzsch
@tpietzsch
Oct 19 2017 11:00
@hanslovsky from ViewerPanel.getDisplay() you would also get the overlays?
Is this what you want?
tpietzsch
@tpietzsch
Oct 19 2017 11:08
We could make TransformAwareBufferedImageOverlayRenderer accessible.
Then you could ViewerPanel.addRenderTransformListener() your thing. It would be notified whenever a new image was painted onto the display. You could then call TransformAwareBufferedImageOverlayRenderer.drawOverlays to render it into your BufferedImage.
tpietzsch
@tpietzsch
Oct 19 2017 11:16
We might run into minor problems because you might be "stealing" the pending flag and Render-TransformListeners would be notified about stuff that is not actually on screen. But shouldn't cause much trouble
Philipp Hanslovsky
@hanslovsky
Oct 19 2017 11:54
@tpietzsch I do not want the overlay, so I will try your suggestion.
tpietzsch
@tpietzsch
Oct 19 2017 12:59
uhm
with my suggestion you would get the overlay
if you do not want that, we should do the following:
tpietzsch
@tpietzsch
Oct 19 2017 13:08
uhm
forget it
I'm stupid
you will not get the overlays with the above suggestion
you could also just add the possibility to access TransformAwareBufferedImageOverlayRenderer.bufferedImage
that you would avoid taking the rendered BufferedImage and copying it into yet another BufferedImage
the rendered BufferedImage will not always have the same size though
first, low (output) resolutions are rendered and then TransformAwareBufferedImageOverlayRenderer.drawOverlays() does the up-scaling
for uploading to a texture that would be a bit stupid...
Philipp Hanslovsky
@hanslovsky
Oct 19 2017 13:14
Yes, I am not entirely sure how to do that, yet. Right now, I am just always rendering, but I think, it should always be at the highest resolution that is going to be rendered only.
tpietzsch
@tpietzsch
Oct 19 2017 13:17
hmm, no I think it should be all the time
otherwise you possibly wouldn't update your texture for long stretches, while the user is moving around and the full resolution is never rendered
Philipp Hanslovsky
@hanslovsky
Oct 19 2017 13:18
That's true.