Esempio n. 1
0
  private Segment addRelativeAxon(Segment parent, Point3f relPosition, float radius) {
    Point3f newPosition = (new Point3f(parent.getEndPointPosition()));
    newPosition.add(relPosition);

    String newName = "Axon_" + getOnlyAxonalSegments().size();

    Segment tempAxon = addAxonalSegment(radius, newName, newPosition, parent, 1, newName + "_Sec");
    return tempAxon;
  }
Esempio n. 2
0
  private Segment addRelativeDendrite(Segment parent, Point3f relPosition) {
    Point3f newPosition = (new Point3f(parent.getEndPointPosition()));
    newPosition.add(relPosition);

    float newRadius = parent.getRadius() * .6f;

    String newName = "Dend_" + getOnlyDendriticSegments().size();

    Segment tempDend =
        addDendriticSegment(newRadius, newName, newPosition, parent, 1, newName + "_Sec", true);
    return tempDend;
  }
Esempio n. 3
0
  public static SphericalRegion getEnclosingSphere(RectangularBox box) {
    Point3f centre =
        new Point3f(
            (box.getHighestXValue() + box.getLowestXValue()) / 2,
            (box.getHighestYValue() + box.getLowestYValue()) / 2,
            (box.getHighestZValue() + box.getLowestZValue()) / 2);

    float radius =
        centre.distance(
            new Point3f(box.getLowestXValue(), box.getLowestYValue(), box.getLowestZValue()));

    SphericalRegion newSphere = new SphericalRegion(centre.x, centre.y, centre.z, radius);

    return newSphere;
  }