Metadata extraction tool based on Bio-Formats
Go to file
2024-11-01 10:23:42 +09:00
.vscode update bio-formats version to 7.1.0. 2024-01-24 12:13:35 +09:00
src/main implement option parameter 2024-10-31 19:16:06 +09:00
.gitignore first commit. 2022-07-12 09:40:35 +09:00
LICENSE.txt add license file. 2022-07-14 09:07:14 +09:00
pom.xml update bio-formats version to 7.3.0. 2024-06-05 12:35:58 +09:00
README.md fix README.md about options 2024-11-01 10:23:42 +09:00

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();
}