Commit d4982e28c220aea0e5e14520ee4ecec4ecc1fc7c

Bumped the version number.
src/acsa/Project.java
(2 / 2)
  
1212public final class Project {
1313 public static final String NAME = "ACSA";
1414 public static final String DESCRIPTION = "Aquatic Crustacean Scan Analyzer";
15 public static final String VERSION = "1.0.0";
16 public static final String BUILD = "2014-06-01";
15 public static final String VERSION = "1.0.1";
16 public static final String BUILD = "2014-06-10";
1717 public static final String[] AUTHORS = {"Sampsa \"Tuplanolla\" Kiiskinen"};
1818 public static final String[] SUPPORTERS = {"Marine Research Centre of Finnish Environment Institute",
1919 "LIFE Financial Instrument of European Commission"};
src/acsa/instances/ClamAnalyzer.java
(9 / 8)
  
146146 logger.info("Set the standard deviation of the mean span to " + normalizedMeanSpanSD + " px.");
147147 logger.info("Set the standard deviation of the span to " + normalizedSDOfSpan + " px.");
148148 logger.info("Set the standard deviation of the standard deviation of the span to " + normalizedSDOfSpanSD + " px.");
149 Thread.sleep(1000); // This allows quick interrupts typical to humans.
149150 ThreadUtilities.allowInterrupt();
150151
151152 logger.info("Encoding the image into a signal array.");
344344 if (conf >= confidence) {
345345 final Scalar actualMaxSpan = halfOutline.get(back.getStart()).distance(halfOutline.get(back.getEnd()));
346346 results.add(new Clam(number,
347 conf,
348 resolution,
349 outline,
350 pose,
351 area / resolution,
352 actualMaxSpan.getFloating() / resolution,
353 circumference / resolution,
354 new Pair<PlaneVector, PlaneVector>(halfOutline.get(back.getStart()), halfOutline.get(back.getEnd()))));
347 conf,
348 resolution,
349 outline,
350 pose,
351 area / resolution,
352 actualMaxSpan.getFloating() / resolution,
353 circumference / resolution,
354 new Pair<PlaneVector, PlaneVector>(halfOutline.get(back.getStart()), halfOutline.get(back.getEnd()))));
355355 logger.info("Accepted the sample.");
356356 ++number;
357357 } else
src/acsa/instances/ShrimpAnalyzer.java
(4 / 3)
  
7878 logger.info("Set the standard deviation of the mean thickness to " + normalizedMeanThicknessSD + " px.");
7979 logger.info("Set the standard deviation of the thickness to " + normalizedSDOfThickness + " px.");
8080 logger.info("Set the standard deviation of the standard deviation of the thickness to " + normalizedSDOfThicknessSD + " px.");
81 Thread.sleep(1000); // This allows quick interrupts typical to humans.
8182 ThreadUtilities.allowInterrupt();
8283
8384 logger.info("Encoding the image into a signal array.");
134134 index < count;
135135 ++index) {
136136 // TODO Reverse simplify and smooth.
137 logger.info("Running #" + index + "/" + number + " iteration.");
137 logger.info("Running iteration #" + index + "/" + number + ".");
138138 final PlaneCurve poutline = fullOutlines.get(index);
139139 if (poutline.isEmpty()
140140 || poutline.isSingular()
150150 logger.info("Expected curvature " + normalizedBackCurvature + ".");
151151 final Range back = new CurveRegionThing(Constants.Y, Floating.valueOf(normalizedBackCurvature)).region(curvatures);
152152 final Range front = back.pseudoInvert();
153 logger.info("Split the back as " + back + ".");
153 logger.info("Split the back around " + back + ".");
154154 final PlaneCurve backOutline = outline.subcurve(back).open();
155155 final PlaneCurve frontOutline = outline.subcurve(front).open().reverse();
156156 if (backOutline.points() < 3
159159 final Scalar backLength = backOutline.length();
160160 final Scalar frontLength = frontOutline.length();
161161 final Scalar scale = backLength.divide(frontLength);
162 logger.info("Back length is " + backLength + ", front length " + frontLength + " and so scale " + scale + ".");
162 logger.info("The back length is " + backLength + ", front length " + frontLength + " and so scale " + scale + ".");
163163 final int sampleCount = frontOutline.points();
164164 final List<Scalar> thicknesses = new ArrayList<Scalar>(sampleCount);
165165 Scalar length = Integral.ZERO;
src/acsa/views/swing/CombinedOverlayView.java
(23 / 23)
  
7979 }
8080 }
8181 }
82 graphics2D.setStroke(getTextStroke());
83 final Font font = graphics2D.getFont();
84 final FontRenderContext context = graphics2D.getFontRenderContext();
85 for (int sampleIndex = 0;
86 sampleIndex < sampleCount;
87 ++sampleIndex) {
88 final Sample sample = soup.getSample(sampleIndex);
89 final PlaneCurve curve = sample.getOutline();
90 final int number = sample.getNumber();
91 final PlaneVector centroid = curve.centroid();
92 final int cornerX = (int )((centroid.getX().getFloating() + offset) * zoom);
93 final int cornerY = (int )((centroid.getY().getFloating() + offset) * zoom);
94 final String string = Integer.toString(number);
95 final TextLayout layout = new TextLayout(string, font, context);
96 final Rectangle2D bounds = layout.getBounds();
97 final AffineTransform transform = new AffineTransform();
98 transform.setToTranslation(cornerX - bounds.getWidth() / 2, cornerY + bounds.getHeight() / 2);
99 final Shape shape = layout.getOutline(transform);
100 graphics2D.setColor(getTextFillColor());
101 graphics2D.draw(shape);
102 graphics2D.setColor(getTextStrokeColor());
103 graphics2D.fill(shape);
104 }
10582 // TODO Move into a specialized class.
10683 if (soup instanceof ClamSoup) {
10784 final ClamSoup clams = (ClamSoup )soup;
119119 graphics2D.drawOval(currentX, currentY, diameter, diameter);
120120 graphics2D.drawOval(previousX, previousY, diameter, diameter);
121121 }
122 }
123 graphics2D.setStroke(getTextStroke());
124 final Font font = graphics2D.getFont();
125 final FontRenderContext context = graphics2D.getFontRenderContext();
126 for (int sampleIndex = 0;
127 sampleIndex < sampleCount;
128 ++sampleIndex) {
129 final Sample sample = soup.getSample(sampleIndex);
130 final PlaneCurve curve = sample.getOutline();
131 final int number = sample.getNumber();
132 final PlaneVector centroid = curve.centroid();
133 final int cornerX = (int )((centroid.getX().getFloating() + offset) * zoom);
134 final int cornerY = (int )((centroid.getY().getFloating() + offset) * zoom);
135 final String string = Integer.toString(number);
136 final TextLayout layout = new TextLayout(string, font, context);
137 final Rectangle2D bounds = layout.getBounds();
138 final AffineTransform transform = new AffineTransform();
139 transform.setToTranslation(cornerX - bounds.getWidth() / 2, cornerY + bounds.getHeight() / 2);
140 final Shape shape = layout.getOutline(transform);
141 graphics2D.setColor(getTextFillColor());
142 graphics2D.draw(shape);
143 graphics2D.setColor(getTextStrokeColor());
144 graphics2D.fill(shape);
122145 }
123146 }
124147 }