|
1 | 1 | package org.janelia.saalfeldlab.n5.shard; |
2 | 2 |
|
3 | 3 |
|
4 | | -import java.util.ArrayList; |
5 | | - |
6 | 4 | import java.util.Arrays; |
7 | | -import java.util.List; |
8 | | - |
9 | | -import org.janelia.saalfeldlab.n5.util.GridIterator; |
10 | 5 |
|
11 | 6 | public class Nesting { |
12 | 7 |
|
@@ -447,40 +442,5 @@ public long[] relativePosition( |
447 | 442 | public int[] relativeBlockSize(final int level) { |
448 | 443 | return relativeToAdjacent[level]; |
449 | 444 | } |
450 | | - |
451 | | - /** |
452 | | - * Given a block position at a particular level, returns a list of |
453 | | - * positions of all sub-blocks at a particular subLevel. |
454 | | - * <p> |
455 | | - * Can be used to get a list of chunk positions for a shard with a |
456 | | - * particular position. |
457 | | - * |
458 | | - * @param position |
459 | | - * a position |
460 | | - * @param level |
461 | | - * the nesting level of the given position |
462 | | - * @param subLevel |
463 | | - * the nesting sub-level of positions to return |
464 | | - * @return the sub-block positions |
465 | | - */ |
466 | | - // TODO: rename to positionsInSubGrid |
467 | | - public List<long[]> positionInSubGrid(long[] position, int level, int subLevel) { |
468 | | - |
469 | | - // find the starting (subLevel grid) coordinates corresponding to the |
470 | | - // first subLevel block in the element at the given level and position |
471 | | - final long[] subPosition = absolutePosition(position, level, subLevel); |
472 | | - |
473 | | - // find the dimensions (number of subLevel blocks in one level block, along each dimension) |
474 | | - final long[] one = new long[numDimensions]; |
475 | | - Arrays.fill(one, 1); |
476 | | - final long[] dimensions = absolutePosition(one, level, subLevel); |
477 | | - |
478 | | - final GridIterator git = new GridIterator(dimensions, subPosition); |
479 | | - final ArrayList<long[]> positions = new ArrayList<>(); |
480 | | - while (git.hasNext()) |
481 | | - positions.add(git.next().clone()); |
482 | | - |
483 | | - return positions; |
484 | | - } |
485 | 445 | } |
486 | 446 | } |
0 commit comments