saalfeldlab / paintera

GNU General Public License v2.0
100 stars 17 forks source link

Use MultiResolutionRenderer from bigdataviewer-core #268

Open maarzt opened 5 years ago

maarzt commented 5 years ago

The MultiResolutionRendererGeneric in Paintera is a fork of the MultiResolutionRenderer in BigDataViewer. This PR is part of an effort. That tries to reintegrate the changes made in Paintera into BigDataViewer.

See also https://github.com/bigdataviewer/bigdataviewer-core/pull/59

Currently I try to reduce the differences between the MultiResolutionRenderer in BigDataViewer and Paintera.

hanslovsky commented 5 years ago

Great, thanks for looking into this @maarzt This will be super helpful! Should the multi-resolution renderer (eventually) live outside bdv-core? Maybe in some imglib2 package? cc @tpietzsch @axtimwalde for opinions

igorpisarev commented 5 years ago

Hi @maarzt, thanks for the efforts! I've modified MultiResolutionRendererGeneric here a few months ago as part of #211 to allow rendering arbitrary parts of the screen, which involved changing the logic quite a bit (as far as I remember). Let me know if I can be of any help in integrating these changes into BDV.

maarzt commented 5 years ago

211 is actually the main motivation to look into this. @hanslovsky @igorpisarev I have some questions.

  1. You never use ViewerState in Paintera's MultiResolutionRendererGeneric What's the motivation for that?
  2. When is setScreenScales called? Is it used often?

(I'm on holidays for one week. I will work on this afterwards.)

hanslovsky commented 5 years ago

You never use ViewerState in Paintera's MultiResolutionRendererGeneric What's the motivation for that?

We do not use the bdv ViewerState in Paintera, so we cannot pass it into the multi-resolution renderer. Ideally, the (generic) multi-resolution renderer would not have any bdv dependencies but replacing all uses of bdv's Source was prohibitively laborous at that time.

When is setScreenScales called? Is it used often?

This is used to adjust screen scales if rendering speed is too slow, e.g. for hidpi displays. This is usually set through the graphical user interface and thus called very rarely, e.g. once per Paintera session.