Class HDF5ObjectsGenerator
Object
org.anchoranalysis.io.generator.SingleFileTypeGenerator<T,T>
org.anchoranalysis.io.generator.OneStageGenerator<org.anchoranalysis.image.voxel.object.ObjectCollection>
org.anchoranalysis.image.io.object.output.hdf5.HDF5ObjectsGenerator
- All Implemented Interfaces:
Generator<org.anchoranalysis.image.voxel.object.ObjectCollection>,TransformingGenerator<org.anchoranalysis.image.voxel.object.ObjectCollection,org.anchoranalysis.image.voxel.object.ObjectCollection>,ElementWriter<org.anchoranalysis.image.voxel.object.ObjectCollection>
public class HDF5ObjectsGenerator extends OneStageGenerator<org.anchoranalysis.image.voxel.object.ObjectCollection>
A generator that writes a
ObjectCollection to a HDF5 file.- Author:
- Owen Feehan
-
Field Summary
Fields Modifier and Type Field Description static StringNUMBER_OBJECTS_ATTRIBUTE_NAMEName of the attribute in the root of the HDF5 that stores the number of objects. -
Constructor Summary
Constructors Constructor Description HDF5ObjectsGenerator()Creates with compression activated.HDF5ObjectsGenerator(boolean compressed) -
Method Summary
Modifier and Type Method Description StringselectFileExtension(OutputWriteSettings settings, Optional<Logger> logger)voidwriteToFile(org.anchoranalysis.image.voxel.object.ObjectCollection element, OutputWriteSettings settings, Path filePath)Methods inherited from class org.anchoranalysis.io.generator.SingleFileTypeGenerator
write, writeWithIndex
-
Field Details
-
NUMBER_OBJECTS_ATTRIBUTE_NAME
Name of the attribute in the root of the HDF5 that stores the number of objects.- See Also:
- Constant Field Values
-
-
Constructor Details
-
HDF5ObjectsGenerator
public HDF5ObjectsGenerator()Creates with compression activated. -
HDF5ObjectsGenerator
public HDF5ObjectsGenerator(boolean compressed)
-
-
Method Details
-
writeToFile
public void writeToFile(org.anchoranalysis.image.voxel.object.ObjectCollection element, OutputWriteSettings settings, Path filePath)- Specified by:
writeToFilein classSingleFileTypeGenerator<org.anchoranalysis.image.voxel.object.ObjectCollection,org.anchoranalysis.image.voxel.object.ObjectCollection>
-
selectFileExtension
- Specified by:
selectFileExtensionin classSingleFileTypeGenerator<org.anchoranalysis.image.voxel.object.ObjectCollection,org.anchoranalysis.image.voxel.object.ObjectCollection>
-