@Override
 public void setPosition(final Localizable localizable) {
   localizable.localize(position);
   int index = 0;
   for (int d = 0; d < n; ++d) index += position[d] * img.steps[d];
   type.updateIndex(index);
 }
Exemple #2
0
  /**
   * TODO
   *
   * @param r The segmentation image.
   * @param op0 Source intensity image.
   * @param op1 Start position.
   */
  @Override
  public final RandomAccessibleInterval<T> compute(
      final RandomAccessibleInterval<T> op0,
      final Localizable op1,
      final RandomAccessibleInterval<T> r) {
    final long[] op1pos = new long[op1.numDimensions()];
    op1.localize(op1pos);
    compute(op0, op1pos, r);

    return r;
  }