Compare commits
No commits in common. "master" and "v1.2.2" have entirely different histories.
13
README.md
13
README.md
@ -11,26 +11,19 @@ mvn package
|
||||
## run
|
||||
|
||||
```shell
|
||||
./target/dist/bin/bioformats-imageinfo "[OPTION]" "[path to image file]"
|
||||
./target/dist/bin/bioformats-imageinfo "[path to image file]"
|
||||
```
|
||||
|
||||
### run by jar
|
||||
|
||||
```shell
|
||||
java -jar ./target/dist/lib/bioformats-imageinfo-1.2.4.jar "[OPTION]" "[path to image file]"
|
||||
java -jar ./target/dist/lib/bioformats-imageinfo-1.2.2.jar "[path to image file]"
|
||||
```
|
||||
|
||||
### run by fat jar
|
||||
|
||||
```shell
|
||||
java -jar ./target/bioformats-imageinfo-1.2.4-jar-with-dependencies.jar "[OPTION]" "[path to image file]"
|
||||
```
|
||||
|
||||
### OPTION
|
||||
|
||||
```shell
|
||||
-M output metadata
|
||||
-T output thumbnail
|
||||
java -jar ./target/bioformats-imageinfo-1.2.2-jar-with-dependencies.jar "[path to image file]"
|
||||
```
|
||||
|
||||
## library usage
|
||||
|
10
pom.xml
10
pom.xml
@ -5,13 +5,13 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>jp.riken.neurodata.tools.BioFormatsImageInfo</groupId>
|
||||
<artifactId>bioformats-imageinfo</artifactId>
|
||||
<version>1.2.4</version>
|
||||
<version>1.2.2</version>
|
||||
|
||||
<name>bioformats-imageinfo</name>
|
||||
<url>https://neurodata.riken.jp</url>
|
||||
|
||||
<properties>
|
||||
<bio-formats.version>7.3.0</bio-formats.version>
|
||||
<bio-formats.version>7.1.0</bio-formats.version>
|
||||
<bioformats-imageinfo.mainClass>jp.riken.neurodata.tools.BioFormatsImageInfo</bioformats-imageinfo.mainClass>
|
||||
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
@ -39,7 +39,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<version>3.4.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-maven</id>
|
||||
@ -76,7 +76,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
@ -113,7 +113,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.7.1</version>
|
||||
<version>3.6.0</version>
|
||||
<configuration>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
|
@ -248,34 +248,17 @@ public class BioFormatsImageInfo {
|
||||
boolean status = true;
|
||||
String message = "";
|
||||
String format = "";
|
||||
boolean metadataON = true;
|
||||
boolean thumbnailON = true;
|
||||
String path = "";
|
||||
final Map<String, Object> metadata = new LinkedHashMap<String, Object>();
|
||||
final Map<String, Object> thumbnail = new LinkedHashMap<String, Object>();
|
||||
if (args.length == 1) {
|
||||
path = args[0];
|
||||
} else if (args.length == 2) {
|
||||
if (args[0].startsWith("-")) {
|
||||
metadataON = args[0].toUpperCase().contains("M");
|
||||
thumbnailON = args[0].toUpperCase().contains("T");
|
||||
}
|
||||
path = args[1];
|
||||
} else {
|
||||
if (args.length != 1) {
|
||||
status = false;
|
||||
message = "invalid parameters";
|
||||
message += "\nUsage ./target/dist/bin/bioformats-imageinfo \"[OPTION]\" \"[path to image file]\"";
|
||||
message += "\n-M output metadata\n-T output thumbnail";
|
||||
}
|
||||
if (status) {
|
||||
message = "filename argument required";
|
||||
} else {
|
||||
final String path = args[0];
|
||||
try {
|
||||
DebugTools.enableLogging("OFF");
|
||||
if (metadataON) {
|
||||
format = readMetadata(path, metadata);
|
||||
}
|
||||
if (thumbnailON) {
|
||||
BioFormatsImageThumbnail.readThumbnail(path, thumbnail);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
status = false;
|
||||
message = t.getMessage();
|
||||
|
Loading…
Reference in New Issue
Block a user