public class ObjectCollectionReader extends Object
ObjectCollection
from the filesystemModifier and Type | Method and Description |
---|---|
static ObjectCollection |
createFromPath(Path path,
OperationContext context)
Reads an object-collection from a path (or path prefix) trying different methods to read the
objects.
|
static boolean |
hasHdf5Extension(Path path)
Whether a path has a suitable extension to be considered a HDF5 file?
|
public static ObjectCollection createFromPath(Path path, OperationContext context) throws DeserializationFailedException
The following order is used to look for an object-mask collection:
.h5it is read as a HDF5 object-mask collection.
.h5is suffixed, and if this path exists, it is read as a HDF5 object-mask collection.
In the case of 3, if the path does not exist, but it is the subpath of an ObjectCollection
directory which does then a special case occurs. An empty ObjectCollection
is returned.
path
- path or (or path missing a
.h5extension) used to search for an object-collection using the rules above
context
- context for reading a stack from the file-system.DeserializationFailedException
- if no objects are found at this path, or anything else
prevents their deserialization.public static boolean hasHdf5Extension(Path path)
path
- the path whose extension is checked.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.