bigdataviewer / bigdataviewer-vistools

Helpers to use BigDataViewer as a quick visualization tool in other projects.
BSD 2-Clause "Simplified" License
25 stars 17 forks source link

Relax NumericType restriction on AbstractSource and RandomAccessibleSources #10

Open nthistle opened 7 years ago

nthistle commented 7 years ago

While not immediately applicable to BdvFunctions.show(), relaxing the NumericType constraint on AbstractSource and the RandomAccessibleSource classes would be helpful for something like ViewerPanel.addSource(), allowing these convenience classes to be used in those applications as well (i.e. passing a RandomAccessibleInterval<LabelMultisetType>).

In the case where T is not a NumericType, only the NearestNeighborInterpolator is used, rather than DefaultInterpolators which requires NumericType so that it can use both Nearest Neighbor and NLinear.

Notably, this solution uses a raw type on DefaultInterpolators, but I don't know of a much better way to do it.

@hanslovsky suggested this change.