Changeset 7771 for trunk/projects
 Timestamp:
 09/15/11 16:38:40 (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/projects/miscplugins/src/main/java/loci/plugins/StitchPrairieTiff.java
r7748 r7771 195 195 196 196 /** Ensures coordinates begin at (0, 0). */ 197 private void normalizeCoords( List<Pt> coords) {197 private void normalizeCoords(final List<Pt> coords) { 198 198 // find minimum coordinates 199 double minX = Double.POSITIVE_INFINITY, minY = Double.POSITIVE_INFINITY; 200 for (Pt pt : coords) { 199 double minX = Double.POSITIVE_INFINITY; 200 double minY = Double.POSITIVE_INFINITY; 201 double minZ = Double.POSITIVE_INFINITY; 202 for (final Pt pt : coords) { 201 203 if (pt.x < minX) minX = pt.x; 202 204 if (pt.y < minY) minY = pt.y; 203 } 204 // normalize coordinates so minimum is (0, 0) 205 for (Pt pt : coords) { 205 if (pt.z < minZ) minZ = pt.z; 206 } 207 // normalize coordinates so minimum is (0, 0, 0) 208 for (final Pt pt : coords) { 206 209 pt.x = minX; 207 210 pt.y = minY; 211 pt.z = minZ; 208 212 } 209 213 }
Note: See TracChangeset
for help on using the changeset viewer.