Open NicoKiaru opened 2 years ago
This PR simply adds a Closeable interface to Image Loaders which already contained a close() method.
This would allow to replace
if ( imgLoader instanceof N5ImageLoader ) { ( ( N5ImageLoader ) imgLoader ).close(); } else if ( imgLoader instanceof N5OMEZarrImageLoader ) { ( ( N5OMEZarrImageLoader ) imgLoader ).close(); } else if ( imgLoader instanceof Hdf5ImageLoader ) { ( ( N5OMEZarrImageLoader ) imgLoader ).close(); }
with
if ( imgLoader instanceof Closeable) { ( ( Closeable) imgLoader ).close(); }
This PR simply adds a Closeable interface to Image Loaders which already contained a close() method.
This would allow to replace
with