bioformats-imageinfo/README.md

42 lines
904 B
Markdown
Raw Permalink Normal View History

2022-07-12 09:40:35 +09:00
# BioFormatsImageInfo
Metadata extraction tool based on Bio-Formats
### make package
2022-07-12 09:40:35 +09:00
```shell
mvn package
2022-07-12 09:40:35 +09:00
```
### run
```shell
./target/dist/bin/bioformats-imageinfo "[path to image file]"
2022-07-12 09:40:35 +09:00
```
### run by jar
2022-07-12 09:40:35 +09:00
```shell
java -jar ./target/dist/lib/bioformats-imageinfo-1.0.0.jar "[path to image file]"
2022-07-12 09:40:35 +09:00
```
### run by fat jar
2022-07-12 09:40:35 +09:00
```shell
java -jar ./target/bioformats-imageinfo-1.0.0-jar-with-dependencies.jar "[path to image file]"
2022-07-12 09:40:35 +09:00
```
### library usage
2022-07-12 09:40:35 +09:00
```java
import java.util.LinkedHashMap;
import java.util.Map;
import jp.riken.neurodata.tools.BioFormatsImageInfo;
import jp.riken.neurodata.tools.BioFormatsException;
String path = "[path to image file]";
String format = "";
Map<String, Object> metadata = new LinkedHashMap<String, Object>();
try {
2022-07-12 09:53:08 +09:00
format = BioFormatsImageInfo.readMetadata(path, metadata);
2022-07-12 09:40:35 +09:00
} catch (BioFormatsImageException e) {
2022-07-12 09:53:08 +09:00
// error occurred
2022-07-12 09:40:35 +09:00
e.printStackTrace();
}
```