From b839a9cff4bff21dc63447166b0610e48413d474 Mon Sep 17 00:00:00 2001 From: Kareez Date: Thu, 11 Oct 2018 23:41:45 +0200 Subject: [PATCH 01/17] updating poms for 2.0.3-SNAPSHOT development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4417699..dbf12ab 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.mhshams jnbis - 2.0.2-SNAPSHOT + 2.0.3-SNAPSHOT jar JNBIS From a635ac54da6c41d8d7c92e9fa9c91ebd7dba9b9a Mon Sep 17 00:00:00 2001 From: Kareez Date: Thu, 11 Oct 2018 23:43:25 +0200 Subject: [PATCH 02/17] updating develop poms to master versions to avoid merge conflicts --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dbf12ab..e7d335d 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.mhshams jnbis - 2.0.3-SNAPSHOT + 2.0.2 jar JNBIS From 720826a9f3206f7613499d6cf1109b16f0bcf5fa Mon Sep 17 00:00:00 2001 From: Kareez Date: Thu, 11 Oct 2018 23:43:25 +0200 Subject: [PATCH 03/17] Updating develop poms back to pre merge state --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e7d335d..dbf12ab 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.mhshams jnbis - 2.0.2 + 2.0.3-SNAPSHOT jar JNBIS From d2708cfdd363e2ee980a9124c0f7e4d3d9f3bcec Mon Sep 17 00:00:00 2001 From: Kareez Date: Tue, 16 Oct 2018 22:24:27 +0200 Subject: [PATCH 04/17] update jackson version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dbf12ab..1173da7 100755 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 1.8 4.12 - 2.5.4 + 2.9.7 3.3 2.4 2.10.3 From e0f4ac750cc98a0363507395a121183fface330e Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Mon, 29 Oct 2018 21:49:41 +0100 Subject: [PATCH 05/17] fix the groupId in the README [fixes #24] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5fc6b9..f1bae59 100755 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ if you are using maven, add it to project dependencies. ```xml - jnbis + com.github.mhshams jnbis 2.x.x From 165c1214579865bb1877dc448dcf056b4338dec3 Mon Sep 17 00:00:00 2001 From: thomas Date: Sun, 5 Jul 2020 18:28:15 +0200 Subject: [PATCH 06/17] Added support for record type 16. The user defined fields are represented as 2D array. --- src/main/java/org/jnbis/api/model/Nist.java | 2 + .../model/record/UserDefinedTestingImage.java | 89 ++++++++++++++++++ .../java/org/jnbis/internal/InternalNist.java | 9 ++ .../java/org/jnbis/internal/NistDecoder.java | 3 + .../java/org/jnbis/internal/NistHelper.java | 1 + .../record/reader/RecordReaderFactory.java | 3 +- .../reader/UserDefinedTestingImageReader.java | 92 +++++++++++++++++++ 7 files changed, 198 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/jnbis/api/model/record/UserDefinedTestingImage.java create mode 100644 src/main/java/org/jnbis/internal/record/reader/UserDefinedTestingImageReader.java diff --git a/src/main/java/org/jnbis/api/model/Nist.java b/src/main/java/org/jnbis/api/model/Nist.java index e0e801c..48d0a1f 100755 --- a/src/main/java/org/jnbis/api/model/Nist.java +++ b/src/main/java/org/jnbis/api/model/Nist.java @@ -37,5 +37,7 @@ public abstract class Nist { public abstract List getVariableResPalmprints(); + public abstract List getUserDefinedTestingImages(); + public abstract List getIrisImages(); } diff --git a/src/main/java/org/jnbis/api/model/record/UserDefinedTestingImage.java b/src/main/java/org/jnbis/api/model/record/UserDefinedTestingImage.java new file mode 100644 index 0000000..ae39123 --- /dev/null +++ b/src/main/java/org/jnbis/api/model/record/UserDefinedTestingImage.java @@ -0,0 +1,89 @@ +package org.jnbis.api.model.record; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.jnbis.internal.record.BaseImageRecord; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +/** + * @author TeeSofteis + */ +public class UserDefinedTestingImage extends BaseImageRecord { + + // 16.003 - 16.005 and 16.013 - 16.998 + // Key is the field identifier and the data is like a 2D array. + @JsonProperty("user_defined_fields") + private Map>> userDefinedFields; + + public Map>> getUserDefinedFields() { + return userDefinedFields; + } + + public void setUserDefinedFields(Map>> userDefinedFields) { + this.userDefinedFields = userDefinedFields; + } + + public void addUserDefinedField(Integer key, ArrayList value) { + if (userDefinedFields == null) { + userDefinedFields = new HashMap<>(); + } + + if (userDefinedFields.containsKey(key)) { + userDefinedFields.get(key).add(value); + } else { + userDefinedFields.put(key, new ArrayList>()); + userDefinedFields.get(key).add(value); + } + } + + // 16.008 - SLC + @JsonProperty("scale_units") + private String scaleUnits; + + // 16.009 - HPS + @JsonProperty("horizontal_pixel_scale") + private String horizontalPixelScale; + + // 16.010 - VPS + @JsonProperty("vertical_pixel_scale") + private String verticalPixelScale; + + // 16.012 - BPX + @JsonProperty("bits_per_pixel") + private String bitsPerPixel; + + public String getScaleUnits() { + return scaleUnits; + } + + public void setScaleUnits(String scaleUnits) { + this.scaleUnits = scaleUnits; + } + + public String getHorizontalPixelScale() { + return horizontalPixelScale; + } + + public void setHorizontalPixelScale(String horizontalPixelScale) { + this.horizontalPixelScale = horizontalPixelScale; + } + + public String getVerticalPixelScale() { + return verticalPixelScale; + } + + public void setVerticalPixelScale(String verticalPixelScale) { + this.verticalPixelScale = verticalPixelScale; + } + + public String getBitsPerPixel() { + return bitsPerPixel; + } + + public void setBitsPerPixel(String bitsPerPixel) { + this.bitsPerPixel = bitsPerPixel; + } + +} diff --git a/src/main/java/org/jnbis/internal/InternalNist.java b/src/main/java/org/jnbis/internal/InternalNist.java index 00f9bea..4f6b14e 100755 --- a/src/main/java/org/jnbis/internal/InternalNist.java +++ b/src/main/java/org/jnbis/internal/InternalNist.java @@ -26,6 +26,7 @@ public class InternalNist extends Nist { private final List variableResolutionLatentImages; private final List variableResolutionFingerprints; private final List variableResolutionPalmprints; + private final List userDefinedTestingImages; private final List irisImages; public InternalNist() { @@ -42,6 +43,7 @@ public InternalNist() { variableResolutionFingerprints = new ArrayList<>(); variableResolutionPalmprints = new ArrayList<>(); irisImages = new ArrayList<>(); + userDefinedTestingImages = new ArrayList<>(); } void setTransactionInfo(TransactionInformation transactionInfo) { @@ -96,6 +98,9 @@ void addVariableResPalmprint(VariableResolutionPalmprint palmprint) { variableResolutionPalmprints.add(palmprint); } + void addUserDefinedTestingImage(UserDefinedTestingImage image) { + userDefinedTestingImages.add(image); + } void addIrisImage(IrisImage image) { irisImages.add(image); } @@ -152,6 +157,10 @@ public List getVariableResPalmprints() { return variableResolutionPalmprints; } + public List getUserDefinedTestingImages() { + return userDefinedTestingImages; + } + public List getIrisImages() { return irisImages; } diff --git a/src/main/java/org/jnbis/internal/NistDecoder.java b/src/main/java/org/jnbis/internal/NistDecoder.java index 4d033d5..f7ea02b 100755 --- a/src/main/java/org/jnbis/internal/NistDecoder.java +++ b/src/main/java/org/jnbis/internal/NistDecoder.java @@ -71,6 +71,9 @@ record = readerFactory.read(token); } else if (record instanceof VariableResolutionPalmprint) { decoded.addVariableResPalmprint((VariableResolutionPalmprint) record); + } else if (record instanceof UserDefinedTestingImage) { + decoded.addUserDefinedTestingImage((UserDefinedTestingImage) record); + } else if (record instanceof IrisImage) { decoded.addIrisImage((IrisImage) record); } diff --git a/src/main/java/org/jnbis/internal/NistHelper.java b/src/main/java/org/jnbis/internal/NistHelper.java index 7ba9fd6..67f948f 100755 --- a/src/main/java/org/jnbis/internal/NistHelper.java +++ b/src/main/java/org/jnbis/internal/NistHelper.java @@ -28,6 +28,7 @@ public class NistHelper { public static final int RT_VR_LATENT_IMAGE = 13; public static final int RT_VR_FINGERPRINT = 14; public static final int RT_VR_PALMPRINT = 15; + public static final int RT_USER_DEFINED_TESTING_IMAGE = 16; public static final int RT_IRIS_IMAGE = 17; // Information separators diff --git a/src/main/java/org/jnbis/internal/record/reader/RecordReaderFactory.java b/src/main/java/org/jnbis/internal/record/reader/RecordReaderFactory.java index 3389473..134a8be 100644 --- a/src/main/java/org/jnbis/internal/record/reader/RecordReaderFactory.java +++ b/src/main/java/org/jnbis/internal/record/reader/RecordReaderFactory.java @@ -1,6 +1,7 @@ package org.jnbis.internal.record.reader; +import org.jnbis.api.model.record.UserDefinedTestingImage; import org.jnbis.internal.NistHelper; import org.jnbis.internal.record.BaseRecord; @@ -34,7 +35,7 @@ public BaseRecord read(NistHelper.Token token) { READERS[NistHelper.RT_VR_LATENT_IMAGE] = new VariableResolutionLatentImageReader(); READERS[NistHelper.RT_VR_FINGERPRINT] = new VariableResolutionFingerprintReader(); READERS[NistHelper.RT_VR_PALMPRINT] = new VariableResolutionPalmprintReader(); - READERS[16] = NOT_SUPPORTED; + READERS[NistHelper.RT_USER_DEFINED_TESTING_IMAGE] = new UserDefinedTestingImageReader(); READERS[NistHelper.RT_IRIS_IMAGE] = new IrisImageReader(); } diff --git a/src/main/java/org/jnbis/internal/record/reader/UserDefinedTestingImageReader.java b/src/main/java/org/jnbis/internal/record/reader/UserDefinedTestingImageReader.java new file mode 100644 index 0000000..e82d475 --- /dev/null +++ b/src/main/java/org/jnbis/internal/record/reader/UserDefinedTestingImageReader.java @@ -0,0 +1,92 @@ +package org.jnbis.internal.record.reader; + +import org.jnbis.internal.NistHelper; +import org.jnbis.api.model.record.UserDefinedTestingImage; + +import java.util.ArrayList; +import java.util.Arrays; + +/** + * @author TeeSofteis + */ +public class UserDefinedTestingImageReader extends RecordReader { + + static final char SEP_US = 31; + static final char SEP_RS = 30; + + @Override + public UserDefinedTestingImage read(NistHelper.Token token) { + if (token.pos >= token.buffer.length) { + throw new RuntimeException("T16::NULL pointer to T16 record"); + } + + UserDefinedTestingImage userDefinedTestingImage = new UserDefinedTestingImage(); + + int start = token.pos; + + NistHelper.Tag tag = getTagInfo(token); + if (tag.field != 1) { + throw new RuntimeException("T16::Invalid Record type = " + tag.type); + } + + Integer length = Integer.parseInt(nextWord(token, NistHelper.TAG_SEP_GSFS, NistHelper.FIELD_MAX_LENGTH - 1, false)); + userDefinedTestingImage.setLogicalRecordLength(length.toString()); + + while (true) { + token.pos++; + tag = getTagInfo(token); + + if (tag.field == 999) { + byte[] data = new byte[length - (token.pos - start)]; + System.arraycopy(token.buffer, token.pos, data, 0, data.length); + token.pos = token.pos + data.length; + userDefinedTestingImage.setImageData(data); + break; + } + + String word = nextWord(token, NistHelper.TAG_SEP_GSFS, NistHelper.FIELD_MAX_LENGTH - 1, false); + switch (tag.field) { + case 1: + userDefinedTestingImage.setLogicalRecordLength(word); + break; + case 2: + userDefinedTestingImage.setImageDesignationCharacter(word); + break; + case 6: + userDefinedTestingImage.setHorizontalLineLength(word); + break; + case 7: + userDefinedTestingImage.setVerticalLineLength(word); + break; + case 8: + userDefinedTestingImage.setScaleUnits(word); + break; + case 9: + userDefinedTestingImage.setHorizontalPixelScale(word); + break; + case 10: + userDefinedTestingImage.setVerticalPixelScale(word); + break; + case 11: + userDefinedTestingImage.setCompressionAlgorithm(word); + break; + case 12: + userDefinedTestingImage.setBitsPerPixel(word); + break; + default: + if ((2 < tag.field && tag.field < 6) || (12 < tag.field && tag.field < 999)) { + // User defined fields could be found at tag 3-5 and 13-998. As the name implies, + // it is not obvious which format the data has. From my point of view, the best + // solution is to handle the data as an array of text. Split data into sub fields and items. + ArrayList subFields = new ArrayList<>(Arrays.asList(word.split(String.valueOf(SEP_RS)))); + for (String subField : subFields) { + ArrayList items = new ArrayList<>(Arrays.asList(subField.split(String.valueOf(SEP_US)))); + userDefinedTestingImage.addUserDefinedField(tag.field, items); + } + } + break; + } + } + return userDefinedTestingImage; + } +} \ No newline at end of file From dfd06ff8613adc2b6b38e803b3447a2977fd6dae Mon Sep 17 00:00:00 2001 From: thomas Date: Tue, 7 Jul 2020 20:34:18 +0200 Subject: [PATCH 07/17] Unit test added --- .../model/record/UserDefinedTestingImage.java | 18 ++--- .../java/org/jnbis/internal/InternalNist.java | 2 +- .../reader/UserDefinedTestingImageReader.java | 13 +-- src/test/java/org/jnbis/Record16Test.java | 80 +++++++++++++++++++ 4 files changed, 89 insertions(+), 24 deletions(-) create mode 100644 src/test/java/org/jnbis/Record16Test.java diff --git a/src/main/java/org/jnbis/api/model/record/UserDefinedTestingImage.java b/src/main/java/org/jnbis/api/model/record/UserDefinedTestingImage.java index ae39123..ca48e4b 100644 --- a/src/main/java/org/jnbis/api/model/record/UserDefinedTestingImage.java +++ b/src/main/java/org/jnbis/api/model/record/UserDefinedTestingImage.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.jnbis.internal.record.BaseImageRecord; -import java.util.ArrayList; import java.util.HashMap; import java.util.Map; @@ -13,29 +12,22 @@ public class UserDefinedTestingImage extends BaseImageRecord { // 16.003 - 16.005 and 16.013 - 16.998 - // Key is the field identifier and the data is like a 2D array. @JsonProperty("user_defined_fields") - private Map>> userDefinedFields; + private Map userDefinedFields; - public Map>> getUserDefinedFields() { + public Map getUserDefinedFields() { return userDefinedFields; } - public void setUserDefinedFields(Map>> userDefinedFields) { + public void setUserDefinedFields(Map userDefinedFields) { this.userDefinedFields = userDefinedFields; } - public void addUserDefinedField(Integer key, ArrayList value) { + public void addUserDefinedField(int key, String value) { if (userDefinedFields == null) { userDefinedFields = new HashMap<>(); } - - if (userDefinedFields.containsKey(key)) { - userDefinedFields.get(key).add(value); - } else { - userDefinedFields.put(key, new ArrayList>()); - userDefinedFields.get(key).add(value); - } + userDefinedFields.put(key, value); } // 16.008 - SLC diff --git a/src/main/java/org/jnbis/internal/InternalNist.java b/src/main/java/org/jnbis/internal/InternalNist.java index 4f6b14e..ead77bf 100755 --- a/src/main/java/org/jnbis/internal/InternalNist.java +++ b/src/main/java/org/jnbis/internal/InternalNist.java @@ -42,8 +42,8 @@ public InternalNist() { variableResolutionLatentImages = new ArrayList<>(); variableResolutionFingerprints = new ArrayList<>(); variableResolutionPalmprints = new ArrayList<>(); - irisImages = new ArrayList<>(); userDefinedTestingImages = new ArrayList<>(); + irisImages = new ArrayList<>(); } void setTransactionInfo(TransactionInformation transactionInfo) { diff --git a/src/main/java/org/jnbis/internal/record/reader/UserDefinedTestingImageReader.java b/src/main/java/org/jnbis/internal/record/reader/UserDefinedTestingImageReader.java index e82d475..ae0022a 100644 --- a/src/main/java/org/jnbis/internal/record/reader/UserDefinedTestingImageReader.java +++ b/src/main/java/org/jnbis/internal/record/reader/UserDefinedTestingImageReader.java @@ -10,10 +10,6 @@ * @author TeeSofteis */ public class UserDefinedTestingImageReader extends RecordReader { - - static final char SEP_US = 31; - static final char SEP_RS = 30; - @Override public UserDefinedTestingImage read(NistHelper.Token token) { if (token.pos >= token.buffer.length) { @@ -77,12 +73,9 @@ public UserDefinedTestingImage read(NistHelper.Token token) { if ((2 < tag.field && tag.field < 6) || (12 < tag.field && tag.field < 999)) { // User defined fields could be found at tag 3-5 and 13-998. As the name implies, // it is not obvious which format the data has. From my point of view, the best - // solution is to handle the data as an array of text. Split data into sub fields and items. - ArrayList subFields = new ArrayList<>(Arrays.asList(word.split(String.valueOf(SEP_RS)))); - for (String subField : subFields) { - ArrayList items = new ArrayList<>(Arrays.asList(subField.split(String.valueOf(SEP_US)))); - userDefinedTestingImage.addUserDefinedField(tag.field, items); - } + // solution is to handle the data as an array of text, therefore split data into + // sub fields and items as you need. + userDefinedTestingImage.addUserDefinedField(tag.field, word); } break; } diff --git a/src/test/java/org/jnbis/Record16Test.java b/src/test/java/org/jnbis/Record16Test.java new file mode 100644 index 0000000..3f3f8d1 --- /dev/null +++ b/src/test/java/org/jnbis/Record16Test.java @@ -0,0 +1,80 @@ +package org.jnbis; + +import org.jnbis.api.Jnbis; +import org.jnbis.api.model.Nist; +import org.jnbis.api.model.record.UserDefinedTestingImage; +import org.junit.Test; + +import java.io.IOException; +import java.util.Map; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +/** + * @author TeeSofteis + */ +public class Record16Test { + private static final String[] FILES = { + "samples/nist/rec01_rec02_rec16.nst" + }; + + @Test + public void type16() { + Nist decoded = decode(FILES[0]); + commonAssert(decoded); + + // Record 01: + assertEquals("194", decoded.getTransactionInfo().getLogicalRecordLength()); // 1.001 + assertEquals("ABC", decoded.getTransactionInfo().getTypeOfTransaction()); // 1.004 + assertEquals("Wallace", decoded.getTransactionInfo().getDestinationAgencyId()); // 1.007 + assertEquals("Gormit", decoded.getTransactionInfo().getOriginatingAgencyId()); // 1.008 + + // Record 16: + assertEquals("4733", decoded.getUserDefinedTestingImages().get(0).getLogicalRecordLength()); // 16.001 + assertEquals("01", decoded.getUserDefinedTestingImages().get(0).getImageDesignationCharacter()); // 16.002 + + List rec16s = decoded.getUserDefinedTestingImages(); + assertEquals(1, rec16s.size()); // only one record + + UserDefinedTestingImage userDefinedTestingImage = rec16s.get(0); + assertEquals("4733", userDefinedTestingImage.getLogicalRecordLength()); + assertEquals("1", userDefinedTestingImage.getScaleUnits()); + assertEquals("1", userDefinedTestingImage.getHorizontalPixelScale()); + assertEquals("1", userDefinedTestingImage.getVerticalPixelScale()); + assertEquals("24", userDefinedTestingImage.getBitsPerPixel()); + + Map userDefinedFields = userDefinedTestingImage.getUserDefinedFields(); + assertEquals(4, userDefinedFields.size()); + + // Tag 16.003 + assertEquals("Wallace\u001FGromit\u001FMcGraw", userDefinedFields.get(3)); + + // Tag 16.004 + assertEquals("Shaun\u001EPreston\u001EPiella Backleicht", userDefinedFields.get(4)); + + // Tag 16.005 + assertEquals("single value", userDefinedFields.get(5)); + + // Tag 16.013 + assertEquals("A1\u001FB1\u001FC1\u001EA2\u001FB2\u001FC2\u001EA3\u001FB3\u001FC3", userDefinedFields.get(13)); + } + + private void commonAssert(Nist decoded) { + assertNotNull(decoded.getTransactionInfo()); + assertEquals(1, decoded.getUserDefinedTexts().size()); + + Map userDefinedFields = decoded.getUserDefinedTexts().get(0).getUserDefinedFields(); + assertEquals("57", userDefinedFields.get(1)); + assertEquals("00", userDefinedFields.get(2)); + assertEquals("domain defined text place holder", userDefinedFields.get(3)); + } + + private Nist decode(String name) { + String fileName = FileUtils.absolute(name); + Nist nist = Jnbis.nist().decode(fileName); + assertNotNull(nist); + return nist; + } +} From f5f21786dc5ee2e74f6da986cf2474570fed2f00 Mon Sep 17 00:00:00 2001 From: thomas Date: Tue, 7 Jul 2020 22:12:17 +0200 Subject: [PATCH 08/17] Self created file for Unit test added --- .../resources/samples/nist/rec01_rec02_rec16.nst | Bin 0 -> 4984 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/test/resources/samples/nist/rec01_rec02_rec16.nst diff --git a/src/test/resources/samples/nist/rec01_rec02_rec16.nst b/src/test/resources/samples/nist/rec01_rec02_rec16.nst new file mode 100644 index 0000000000000000000000000000000000000000..032ab94acdeb0041ea74655953dab5d79b1be5a7 GIT binary patch literal 4984 zcmaJ^2|SeR_kS5nc0(xJ$Z};jGYqC8WY0Q-EMdqtma&Gil_e#Vtu*1vKDLl0G~k_vK>B*ydr91|cW`#Mzj3UBN+U^Mm^4B`;lvwyoP{Jp{=^3R7Ys*g>7gaGASbb) zGJl7LLg8{yxH&iMqykwvo?}2NK>7s0kvDK|7-x6B-y!*Y?EQWCJdU&DbHcgau=nDI zB2GMI#e@9jL4M^1d z(vUdOHc-=0Ie88W`^y6gM=C=hDo}_jlvf!BQGr2JVZ6$4hzcB{da^o+QsmL_(G>Q-|S)TKJXE=p;*xC7^ z=Y&MWBqgOdAaHrOgxq-vNii~7T3SX1MowmCP6-}fAqfcyF&IfmNJxrKPb_p-a zn?C=zfhL^gA%W_pN(RFvn(YeF7hC;L zFZCNVEjwT$^L<+fZu6LA$bxI5a5epzJm`Z9r-ufHiVp2GKeZOOX>RZ~E(cv~x^GjP zWDrrHw>>T#CNh`P)?OWpa!d=VkfJ?XPkLw-ieaS!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2MtZSj*Q-U=rGL+@|PXs4N>_ z&J~tYNfuH5J2XIJ^K3kYH-*RJ;w@a;`~U2Z_;ZL^oIj1K2# zz9vs?XX)!ZyM#nZ6+TcKp0gcv9xkmz_|z#cQRQeQ}V?x>M|?CSVk81YtAD z)e6Mcl8o>%f$d?UgnGW{*(MImdwf&o)p+q$yPmEUIeorA67n%;=j319RY1lJI`Od zl)%bz`HWNy;Q*Q*v5&)&$<* zVuJ4KLu*s$QhQvR9OaWhjgi@A{$N#lw{y9j=!&4gX6x$J5=b@EUsl>!_?47S+ zJ6+GM8@ZU1v#)IyP6{bA)*S&Y!}#z*J;2>+e65S%qe#8DY{gOhb?n_U+Waof>qetxo|mD z@Ts-uOQ>MRyah8NHsKpfLs5>T4%*-*^^~_)aDfMPb0Km)b;u6Wk^u`lQ`=OLB&| z)+RR@mjb#1F~(`85t)u*d%L`$5`_T|L2P=%&-+yGStd4#R^BqpDennE!ov!JY_=e- zM<(qm0p{zT_ayx-aUx*m{C}wYSHwD6A{n_lo@uLoN;OT}_@qr7c2u z&138da?h`c0d#D}Qw@wNKR0IHzQ0EnYyN=tk@B2yH!8{WOn8Bz3L&zp?o52MUuX}5 zzGA#Xj-h6Jqu;evk(E!Id`^L%({7jU@p&U?m07tKUi1Z5UXF8{&(qMk6QUfjsp06+ zX}1&x-h3A_fd~&#gz?=pf13Xg+w?^UR<&0| literal 0 HcmV?d00001 From 71c302bf97931d00c69bcef9975acd6074be3352 Mon Sep 17 00:00:00 2001 From: oculushut Date: Thu, 10 Jun 2021 14:32:29 +0100 Subject: [PATCH 09/17] Update README.md removes some unnecessary brackets in sample code --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f1bae59..92199e2 100755 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ Nist nist = Jnbis.nist().decode("/path/to/nist/file")); Decode a NIST file with given **File** instance ```Java -Nist nist = Jnbis.nist().decode(new File("/path/to/nist/file"))); +Nist nist = Jnbis.nist().decode(new File("/path/to/nist/file")); ``` Decode a NIST file with given **InputStream** instance @@ -91,7 +91,7 @@ Nist nist = Jnbis.nist().decode(nistInputStream)); **Nist** instance contains different types of data, depending on file type. Here is a sample code that extract all fingerprints and save them in individual files. ```Java -Nist nist = Jnbis.nist().decode(new File("/path/to/nist/file"))); +Nist nist = Jnbis.nist().decode(new File("/path/to/nist/file")); for (HighResolutionGrayscaleFingerprint fp : nist.getHiResGrayscaleFingerprints()) { Jnbis.wsq() From f66e3927d1da39905a0035ee9069c99795826332 Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Wed, 29 Dec 2021 23:07:21 +0100 Subject: [PATCH 10/17] Upgrade jackson version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1173da7..e821693 100755 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 1.8 4.12 - 2.9.7 + 2.13.1 3.3 2.4 2.10.3 From 7732a7f14f1281ba5f190b35bda5fc175d34ecdb Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Wed, 29 Dec 2021 23:22:28 +0100 Subject: [PATCH 11/17] Fix travis issues --- .travis.yml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9e0e981..3b0ccdf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: java jdk: - - oraclejdk8 + - openjdk8 notifications: email: false diff --git a/README.md b/README.md index 92199e2..2b0d410 100755 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Java Implementation of NIST Biometric Image Software (NBIS) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) -* master [![Build Status](https://travis-ci.org/kareez/jnbis.svg?branch=master)](https://travis-ci.org/kareez/jnbis) -* develop [![Build Status](https://travis-ci.org/kareez/jnbis.svg?branch=develop)](https://travis-ci.org/kareez/jnbis) +* master [![Build Status](https://travis-ci.org/mhshams/jnbis.svg?branch=master)](https://travis-ci.org/mhshams/jnbis) +* develop [![Build Status](https://travis-ci.org/mhshams/jnbis.svg?branch=develop)](https://travis-ci.org/mhshams/jnbis) ### About JNBIS From 6cb50ae9ef75ed3b38acf34107f630a34e8159d1 Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Wed, 29 Dec 2021 23:28:46 +0100 Subject: [PATCH 12/17] Update travis URL --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b0d410..47f7287 100755 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Java Implementation of NIST Biometric Image Software (NBIS) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) -* master [![Build Status](https://travis-ci.org/mhshams/jnbis.svg?branch=master)](https://travis-ci.org/mhshams/jnbis) -* develop [![Build Status](https://travis-ci.org/mhshams/jnbis.svg?branch=develop)](https://travis-ci.org/mhshams/jnbis) +* master [![Build Status](https://travis-ci.com/mhshams/jnbis.svg?branch=master)](https://travis-ci.com/mhshams/jnbis) +* develop [![Build Status](https://travis-ci.com/mhshams/jnbis.svg?branch=develop)](https://travis-ci.com/mhshams/jnbis) ### About JNBIS From 04f3ac307174439fec65a68e0238a7c04dad2067 Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Wed, 29 Dec 2021 23:31:05 +0100 Subject: [PATCH 13/17] Upgrade junit version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e821693..8e40fbc 100755 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ 1.8 - 4.12 + 4.13.2 2.13.1 3.3 2.4 From 8a4dae949c64a3e299963493f506178567215f6e Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Wed, 29 Dec 2021 23:43:32 +0100 Subject: [PATCH 14/17] Repalce travis with github actions --- .github/workflows/ci.yaml | 23 +++++++++++++++++++++++ .travis.yml | 13 ------------- README.md | 3 --- 3 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..f777984 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,23 @@ +name: CI + +on: + push: + branches: + - develop + pull_request: + branches: + - develop + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + - name: Build + run: mvn --batch-mode --update-snapshots verify diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3b0ccdf..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: java - -jdk: - - openjdk8 - -notifications: - email: false - -# whitelist -branches: - only: - - master - - develop diff --git a/README.md b/README.md index 47f7287..623207c 100755 --- a/README.md +++ b/README.md @@ -2,9 +2,6 @@ Java Implementation of NIST Biometric Image Software (NBIS) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) -* master [![Build Status](https://travis-ci.com/mhshams/jnbis.svg?branch=master)](https://travis-ci.com/mhshams/jnbis) -* develop [![Build Status](https://travis-ci.com/mhshams/jnbis.svg?branch=develop)](https://travis-ci.com/mhshams/jnbis) - ### About JNBIS JNBIS is a library, written in Java, to extract and decode NIST (National Institute of Standards and Technology) compressed files and WSQ (Wavelet Scalar Quantization) images. From fc2709a34b99e53c29fc1222528ecea5762a7d91 Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Wed, 29 Dec 2021 23:54:38 +0100 Subject: [PATCH 15/17] Update readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 623207c..b59257d 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # JNBIS Java Implementation of NIST Biometric Image Software (NBIS) + [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) +![example workflow](https://github.com/mhshams/jnbis/actions/workflows/ci.yaml/badge.svg) +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.mhshams/jnbis/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.mhshams/jnbis) ### About JNBIS From d74baf9108eb1a301d056bc5056c2261b695bb3a Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Thu, 30 Dec 2021 12:32:08 +0100 Subject: [PATCH 16/17] Update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b59257d..c84dd3e 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # JNBIS Java Implementation of NIST Biometric Image Software (NBIS) -[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) -![example workflow](https://github.com/mhshams/jnbis/actions/workflows/ci.yaml/badge.svg) +![CI](https://github.com/mhshams/jnbis/actions/workflows/ci.yaml/badge.svg) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.mhshams/jnbis/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.mhshams/jnbis) +[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) ### About JNBIS From 15fad43cc6aa2792f40d4f6d009b58fe81c63e65 Mon Sep 17 00:00:00 2001 From: Mohammad Sarbandi Date: Thu, 30 Dec 2021 12:33:51 +0100 Subject: [PATCH 17/17] updating poms for branch'release/2.0.3' with non-snapshot versions --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8e40fbc..7ec0fc3 100755 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.github.mhshams jnbis - 2.0.3-SNAPSHOT + 2.0.3 jar JNBIS