Skip to content

Commit

Permalink
- Ketones och Specific Gravity har nu uppdaterad relativ x och
Browse files Browse the repository at this point in the history
  y-position.
- Uppdaterad testfall med nya parametrar för Specific Gravity i
  FieldFinderTest.
- Ketones har ytterliggare en färg i färgskalan för tillåtna färger i
  KETONES.csv samt i testfallet i FieldTypeTest.
  • Loading branch information
mantono committed Jul 29, 2015
1 parent 3b253c0 commit 63e2892
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/diacheck/java/libs/imageTools/FieldType.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public enum FieldType
WHITE_BALANCE(50, 0.53962, 0.68495),
CONTROL(25, 0.5, 0.5),
GLUCOSE(20, 0.75075, 0.49887),
KETONES(35, 0.9708214, 0.049887),
KETONES(35, 0.9446, 0.485714),
PH(25, 0.67251, 0.484962),
PROTEIN(35, 0.606241, 0.483459),
SPECIFIC_GRAVITY(20, 0.5, 0.5);
SPECIFIC_GRAVITY(60, 0.80575, 0.48722);

private final double xRatio;
private final double yRatio;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
254, 221, 188
223, 179, 196
177, 87, 141
81, 0, 77
110, 95, 114
81, 0, 77
8 changes: 1 addition & 7 deletions test/diacheck/java/libs/imageTools/test/FieldFinderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ public void setUp() throws Exception
fieldFinder = new FieldFinder(ImageIO.read(input));
}

@Test
public void test()
{
fail("Not yet implemented");
}

@Test
public void testFindFirstPixelOfFieldForWhiteBalance() throws IOException
{
Expand Down Expand Up @@ -91,7 +85,7 @@ public void testLocateProteinField() throws IOException
@Test
public void testLocateSpecificGravityField() throws IOException
{
testField(FieldType.SPECIFIC_GRAVITY, new Color(0, 0, 0));
testField(FieldType.SPECIFIC_GRAVITY, new Color(159, 132, 89));
}

public void testField(FieldType field, Color expectedColor) throws IOException
Expand Down
1 change: 1 addition & 0 deletions test/diacheck/java/libs/imageTools/test/FieldTypeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public void testKetones()
new Color(254, 221, 188),
new Color(223, 179, 196),
new Color(177, 87, 141),
new Color(110, 95, 114),
new Color(81, 0, 77));
assertEquals(35, FieldType.KETONES.getThreshold());
}
Expand Down

0 comments on commit 63e2892

Please sign in to comment.