Metadata extraction tool based on Bio-Formats
Go to file
2022-10-12 19:42:09 +09:00
src/main/java/jp/riken/neurodata/tools perform auto scalling if 16bit or gray scale thumbnail image. 2022-10-12 19:42:09 +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 catch undeclared exception in higher method. 2022-10-07 19:13:15 +09:00
README.md update version to 1.1.2. 2022-10-07 19:24:06 +09:00

BioFormatsImageInfo

Metadata extraction tool based on Bio-Formats

make package

mvn package

run

./target/dist/bin/bioformats-imageinfo "[path to image file]"

run by jar

java -jar ./target/dist/lib/bioformats-imageinfo-1.1.2.jar "[path to image file]"

run by fat jar

java -jar ./target/bioformats-imageinfo-1.1.2-jar-with-dependencies.jar "[path to image file]"

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