Metadata extraction tool based on Bio-Formats
.vscode | ||
src/main | ||
.gitignore | ||
LICENSE.txt | ||
pom.xml | ||
README.md |
BioFormatsImageInfo
Metadata extraction tool based on Bio-Formats
make package
mvn package
run
./target/dist/bin/bioformats-imageinfo "[OPTION]" "[path to image file]"
run by jar
java -jar ./target/dist/lib/bioformats-imageinfo-1.2.3.jar "[OPTION]" "[path to image file]"
run by fat jar
java -jar ./target/bioformats-imageinfo-1.2.3-jar-with-dependencies.jar "[OPTION]" "[path to image file]"
OPTION
-M output metadata
-T output thumbnail
library usage
import java.util.LinkedHashMap;
import java.util.Map;
import jp.riken.neurodata.tools.BioFormatsImageInfo;
import jp.riken.neurodata.tools.BioFormatsImageException;
import jp.riken.neurodata.tools.BioFormatsImageThumbnail;
String path = "[path to image file]";
String format = "";
Map<String, Object> metadata = new LinkedHashMap<String, Object>();
Map<String, Object> thumbnail = new LinkedHashMap<String, Object>();
try {
format = BioFormatsImageInfo.readMetadata(path, metadata);
BioFormatsImageThumbnail.readThumbnail(path, thumbnail);
} catch (BioFormatsImageException e) {
// error occurred
e.printStackTrace();
}