Skip to content

Conversation

NicoKiaru
Copy link
Contributor

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();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants