bigdataviewer / bigdataviewer-core

ImgLib2-based viewer for registered SPIM stacks and more
BSD 2-Clause "Simplified" License
33 stars 35 forks source link

Better separation of functionalities #188

Open tischi opened 4 years ago

tischi commented 4 years ago

Currently BdvFunction.show is doing three things:

This is very convenient, but I was wondering whether it could be possible to separate this a bit.

For example,

Right now, one can kind of do the same using SourceAndConverter sac = BdvFunctions.show( ... ).getSources().get( ... ) but one needs to show the object in order to convert it to a SourceAndConverter. In my experience, if dealing with many SourceAndConverters it can help to have a list of all of them already before showing them in bdv.

Also separating above functionalities into separate classes might simply structure the current code a bit more.