public class N5Factory extends Object implements Serializable
| Constructor and Description |
|---|
N5Factory() |
public N5FactoryOptions getOptions()
public N5Factory setOptions(N5FactoryOptions options)
public N5Factory options(Consumer<N5FactoryOptions> configureOptions)
@Deprecated public N5Factory s3UseCredentials()
s3Configuration.public N5Factory hdf5DefaultBlockSize(int... blockSize)
getOptions() and N5FactoryOptions.hdf5(Consumer)public N5Factory hdf5OverrideBlockSize(boolean override)
getOptions() and N5FactoryOptions.hdf5(Consumer)public N5Factory gsonBuilder(com.google.gson.GsonBuilder gsonBuilder)
getOptions() and N5FactoryOptions.gsonBuilder(GsonBuilder)public N5Factory cacheAttributes(boolean cacheAttributes)
getOptions() and N5FactoryOptions.cacheAttributes(boolean)public N5Factory zarrDimensionSeparator(String separator)
getOptions(), N5FactoryOptions.zarr2(Consumer), Zarr2Builder.dimensionSeparator(String)separator - to use for Zarr2 dimension separatorpublic N5Factory zarrMapN5Attributes(boolean mapAttributes)
getOptions(), N5FactoryOptions.zarr2(Consumer), Zarr2Builder.mapN5DatasetAttributes(boolean)mapAttributes - see ZarrKeyValueReader.getAttributes(String)public N5Factory zarrMergeAttributes(boolean mergeAttributes)
getOptions(), N5FactoryOptions.zarr2(Consumer), Zarr2Builder.mergeAttributes(boolean)mergeAttributes - see ZarrKeyValueReader.getAttributes(String)public N5Factory preferredStorageFormat(StorageFormat format)
format - the storage format to try first.public N5Factory s3Configuration(Consumer<software.amazon.awssdk.services.s3.S3ClientBuilder> builderConfig)
S3ClientBuilder,
and thereby the S3Client.public N5Factory googleCloudConfiguration(Consumer<com.google.cloud.storage.StorageOptions.Builder> builderConfig)
StorageOptions.Builder,
and thereby the Google Cloud Storage client.protected software.amazon.awssdk.services.s3.S3Client createS3(String uri)
protected com.google.cloud.storage.Storage createGoogleCloudStorage()
@Nullable public org.janelia.saalfeldlab.n5.KeyValueAccess getKeyValueAccess(URI uri, boolean readOnly)
URI to and return the appropriate KeyValueAccess.
If no appropriate KeyValueAccess is found, may be null
This differs subtly from KeyValueAccessBackend.getKeyValueAccess(URI, boolean) in that
the resulting KeyValueAccess may use configured fields from this N5Factory.
uri - to create a KeyValueAccess from.KeyValueAccess and container path, or null if none are valid@Deprecated public org.janelia.saalfeldlab.n5.N5Reader openFSReader(String path)
openReader(StorageFormat, URI) insteadN5Reader over an N5 Container.
NOTE: The name seems to imply that this will open any N5Reader, over a
FileSystemKeyValueAccess however that is misleading. Instead
this will open any N5Container that is a valid StorageFormat.N5.
This is partially why it is deprecated, as well as the redundant
implementation with openReader(StorageFormat, URI).
path - path to the n5 root folder@Deprecated public org.janelia.saalfeldlab.n5.N5Reader openZarrReader(String path)
openReader(StorageFormat, URI) insteadN5Reader for Zarr.
For more options of the Zarr backend study the N5ZarrReader
constructors.}
path - path to the zarr directory@Deprecated public org.janelia.saalfeldlab.n5.N5Reader openHDF5Reader(String path)
openReader(StorageFormat, URI) insteadN5Reader for HDF5. Close the reader when you do not need
it any more.
For more options of the HDF5 backend study the N5HDF5Reader
constructors.
path - path to the hdf5 file@Deprecated public org.janelia.saalfeldlab.n5.N5Reader openGoogleCloudReader(String uri)
openReader(KeyValueAccessBackend, URI) insteadN5Reader for Google Cloud.uri - uri to the google cloud object@Deprecated public org.janelia.saalfeldlab.n5.N5Reader openAWSS3Reader(String uri)
openReader(KeyValueAccessBackend, URI) insteadN5Reader for AWS S3.uri - uri to the amazon s3 object@Deprecated public org.janelia.saalfeldlab.n5.N5Reader openFileSystemReader(String uri)
openReader(KeyValueAccessBackend, URI) insteadN5Reader over a FileSytem.uri - uri to the N5Readerpublic org.janelia.saalfeldlab.n5.N5Reader openReader(String uri)
N5Reader at the given URL, with best attempts to infer
the appropriate KeyValueAccessBackend and StorageFormat.uri - the root location of the storepublic org.janelia.saalfeldlab.n5.N5Reader openReader(StorageFormat format, String uri)
N5Reader at the given URL, with best attempts to infer
the appropriate KeyValueAccessBackend.format - of the data store this N5Reader is accessinguri - the root location of the storepublic org.janelia.saalfeldlab.n5.N5Reader openReader(StorageFormat format, URI uri)
N5Reader at the given URL, with best attempts to infer
the appropriate KeyValueAccessBackend.format - of the data store this N5Reader is accessinguri - the root location of the storepublic org.janelia.saalfeldlab.n5.N5Reader openReader(KeyValueAccessBackend backend, String uri)
KeyValueAccessBackend.backend - key-value accessuri - location of readerpublic org.janelia.saalfeldlab.n5.N5Reader openReader(KeyValueAccessBackend backend, URI uri)
KeyValueAccessBackend.backend - key-value accessuri - location of readerpublic org.janelia.saalfeldlab.n5.N5Reader openReader(@Nullable StorageFormat storage, org.janelia.saalfeldlab.n5.KeyValueAccess access, URI location)
containerPath requiring the specific StorageFormat and using KeyValueAccess.storage - of the underlying data store this N5Reader is overaccess - to the key-value backend of the underlying datalocation - root URI of the resulting N5Reader@Deprecated public org.janelia.saalfeldlab.n5.N5Writer openFSWriter(String path)
openWriter(StorageFormat, URI) insteadN5Writer for N5 Container.
NOTE: The name seems to imply that this will open any N5Writer, over a
FileSystemKeyValueAccess however that is misleading. Instead
this will open any N5Container that is a valid StorageFormat.N5.
This is partially why it is deprecated, as well as the redundant
implementation with openWriter(StorageFormat, URI).
path - path to the n5 directory@Deprecated public org.janelia.saalfeldlab.n5.N5Writer openZarrWriter(String path)
openWriter(StorageFormat, URI)) insteadN5Writer for Zarr.
For more options of the Zarr backend study the N5ZarrWriter
constructors.
path - path to the zarr directory@Deprecated public org.janelia.saalfeldlab.n5.N5Writer openHDF5Writer(String path)
openReader(StorageFormat, URI) insteadN5Writer for HDF5. Don't forget to close the writer after
writing to close the file and make it available to other processes.
For more options of the HDF5 backend study the N5HDF5Writer
constructors.
path - path to the hdf5 file@Deprecated public org.janelia.saalfeldlab.n5.N5Writer openGoogleCloudWriter(String uri)
openWriter(KeyValueAccessBackend, String) instead.N5Writer for Google Cloud.uri - uri to the google cloud object@Deprecated public org.janelia.saalfeldlab.n5.N5Writer openAWSS3Writer(String uri)
openWriter(KeyValueAccessBackend, String) instead.N5Writer for AWS S3.uri - uri to the s3 objectpublic org.janelia.saalfeldlab.n5.N5Writer openWriter(String uri)
N5Writer at the given URL, with best attempts to infer
the appropriate KeyValueAccessBackend and StorageFormat.uri - the root location of the storepublic org.janelia.saalfeldlab.n5.N5Writer openWriter(KeyValueAccessBackend backend, URI uri)
backend - key-value accessuri - location of writerpublic org.janelia.saalfeldlab.n5.N5Writer openWriter(KeyValueAccessBackend backend, String uri)
backend - key-value accessuri - location of writerpublic org.janelia.saalfeldlab.n5.N5Writer openWriter(StorageFormat format, String uri)
N5Writer at the given URL, with best attempts to infer
the appropriate KeyValueAccessBackend.format - of the data store for this N5Writeruri - the root location of the storepublic org.janelia.saalfeldlab.n5.N5Writer openWriter(StorageFormat format, URI uri)
N5Writer at the given URL, with best attempts to infer
the appropriate KeyValueAccessBackend.format - of the data store for this N5Writeruri - the root location of the storepublic org.janelia.saalfeldlab.n5.N5Writer openWriter(@Nullable StorageFormat storage, org.janelia.saalfeldlab.n5.KeyValueAccess access, URI location)
storage - of the underlying data store this N5Writer is overaccess - to the key-value backend of the underlying datalocation - root location of the resulting N5Writerpublic static org.janelia.saalfeldlab.n5.N5Writer createWriter(String containerUri)
containerUri - location of the N5 containerpublic static org.janelia.saalfeldlab.n5.N5Reader createReader(String containerUri)
containerUri - location of the N5 containerCopyright © 2021–2026 Saalfeld Lab. All rights reserved.