bioformats-imageinfo/README.md

51 lines
1.1 KiB
Markdown

# BioFormatsImageInfo
Metadata extraction tool based on Bio-Formats
## make package
```shell
mvn package
```
## run
```shell
./target/dist/bin/bioformats-imageinfo "[path to image file]"
```
### run by jar
```shell
java -jar ./target/dist/lib/bioformats-imageinfo-1.2.0.jar "[path to image file]"
```
### run by fat jar
```shell
java -jar ./target/bioformats-imageinfo-1.2.0-jar-with-dependencies.jar "[path to image file]"
```
## library usage
```java
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();
}
```