Add toSourceAndConverter convenience method
Closed this issue · 4 comments
I added a convenience method
public static < T extends RealType< T > > List< SourceAndConverter< T > > toSourceAndConverter(
final RandomAccessibleInterval< T > img,
final Converter< T, ARGBType > converter,
final AxisOrder axisOrder,
final AffineTransform3D sourceTransform,
final String... names )
that creates a List< SourceAndConverter< ? > >
from a RandomAccessibleInterval< T >
and a Converter< T, ARGBType >
:
hanslovsky@dc64334
This makes it easy, for example, to create a standalone ViewerPanel
just from a RandomAccessibleInterval
.
Would it make sense to add this to master?
@hanslovsky as mentioned on gitter, there is a standalone ViewerPanel
already.
See https://github.com/bigdataviewer/bigdataviewer-vistools/blob/master/src/test/java/bdv/util/PanelExample.java
Does this make this PR obsolete?
@hanslovsky ... nevertheless, this looks useful
I think it would make sense to pull it out as a common part of addStackSourceARGBType
and addStackSourceRealType
.
I'll look into it while merging your PRs
I agree. Right now, I just have it only for RandomAccessibleInterval
but it would make sense for all other cases, as well. Let me know if you want me to do that.
With the recent changes in bdv-vistools this has become obsolete for me. Re-open this issue if you think it is still valid.