Created
March 19, 2021 21:48
-
-
Save bogovicj/01431efb9fe5701da1a40ca4c756f2d4 to your computer and use it in GitHub Desktop.
Read a zarr volume and display with bigdataviewer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.imglib2.*; | |
import bdv.util.*; | |
import org.janelia.saalfeldlab.n5.zarr.*; | |
import org.janelia.saalfeldlab.n5.imglib2.*; | |
/* | |
* A groovy script for Fiji that reads a zarr volume and displays it using BigDataViewer | |
* | |
* John Bogovic | |
*/ | |
try | |
{ | |
RandomAccessibleInterval img = N5Utils.open( new N5ZarrReader( "/path/to/my.zarr" ), "/dataset" ); | |
BdvFunctions.show( img, "a-descriptive-name" ); | |
} | |
catch ( Exception e ) | |
{ | |
e.printStackTrace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment