bigdataviewer / bigdataviewer-core

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

WrappedSource #125

Open tischi opened 3 years ago

tischi commented 3 years ago

@tpietzsch @bogovicj @NicoKiaru @tinevez

I am wondering whether it could be worth adding this to bdv-core:

public interface SourceWrapper< T >
{
    Source< T > getWrappedSource();
}

TransformedSource could implement it and in MoBIE and bdv-playground we are having a couple of other classes that would also implement it (WarpedSource, CroppedSource, and ResampledSource). Maybe this could help going backwards through a potential chain of operations that have been done to a source because one could ask instanceof SourceWrapper.