Exemple #1
0
 boolean intersects(final Area area, final double z_first, final double z_last) {
   for (int i = 0; i < n_points; i++) {
     final Layer la = layer_set.getLayer(p_layer[i]);
     if (la.getZ() >= z_first && la.getZ() <= z_last) {
       for (int k = 0; k < n_points; k++) {
         if (area.contains(p[0][k], p[1][k])) return true;
       }
     }
   }
   return false;
 }
Exemple #2
0
 @Override
 public Layer getFirstLayer() {
   double min_z = Double.MAX_VALUE;
   Layer min_la = this.layer; // so a null pointer is not returned
   for (final Item item : al_items) {
     final Layer la = item.getFirstLayer();
     if (null != la && la.getZ() < min_z) {
       min_z = la.getZ();
       min_la = la;
     }
   }
   return min_la;
 }
Exemple #3
0
 final void addResults(final ResultsTable rt, final Calibration cal, final double nameid) {
   for (int i = 0; i < n_points; i++) {
     final Layer la = layer_set.getLayer(p_layer[i]);
     if (null == layer) {
       Utils.log("Dissector.addResults: could not find layer with id " + p_layer[i]);
       continue;
     }
     final Point2D.Double po = M.transform(Dissector.this.at, p[0][i], p[1][i]);
     rt.incrementCounter();
     rt.addLabel("units", cal.getUnit());
     rt.addValue(0, Dissector.this.id);
     rt.addValue(1, tag);
     rt.addValue(2, po.x * cal.pixelWidth);
     rt.addValue(3, po.y * cal.pixelHeight);
     rt.addValue(4, la.getZ() * cal.pixelWidth); // layer Z is in pixels
     rt.addValue(5, radius * cal.pixelWidth);
     rt.addValue(6, nameid);
   }
 }