Package rife.cmf.loader.image
Class ImageJLoader
java.lang.Object
rife.cmf.loader.ImageContentLoaderBackend
rife.cmf.loader.image.ImageJLoader
- All Implemented Interfaces:
ContentLoaderBackend<Image>
This is an image loader back-end that uses ImageJ to load TIFF files, if
its classes are present in the classpath.
More information about ImageJ can be obtained from https://imagej.net.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the back-end is present.loadFromBytes(byte[] data, Set<String> errors) Loads the data from a byte array.Methods inherited from class rife.cmf.loader.ImageContentLoaderBackend
load
-
Constructor Details
-
ImageJLoader
public ImageJLoader()
-
-
Method Details
-
loadFromBytes
public LoadedContent<Image> loadFromBytes(byte[] data, Set<String> errors) throws ContentManagerException Description copied from class:ImageContentLoaderBackendLoads the data from a byte array.- Specified by:
loadFromBytesin classImageContentLoaderBackend- Parameters:
data- the raw data that has to be loadederrors- a set to which possible error messages will be added- Returns:
- an instance of the
LoadedContentwithImagedata; ornullif the raw data couldn't be loaded - Throws:
ContentManagerException
-
isBackendPresent
public boolean isBackendPresent()Description copied from interface:ContentLoaderBackendIndicates whether the back-end is present.This can be important for optional libraries that should only actually try to load the data when the required classes are available in the classpath.
- Returns:
trueif the back-end is present; orfalseif this is not the case
-