saalfeldlab / n5-spark

Spark-driven processing utilities for N5 datasets.
BSD 2-Clause "Simplified" License
3 stars 7 forks source link

Fix N5 to slice TIF conversion for incompatible types #22

Closed igorpisarev closed 4 years ago

igorpisarev commented 4 years ago

ImagePlus supports only three types:

In case the input type is not one of these, the conversion used to fail due to inability to instantiate an ImagePlus of the requested type. To solve this, the converter now maps other types to these supported types. It also validates if the output type can indeed store all data values and fails if it's not possible (for example, int64 needs to be saved as GRAY16).