Skip to content

Commit

Permalink
Follow API changes from imglib/imglib2-roi#71
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Apr 5, 2024
1 parent e73e1f1 commit 813b6a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void initialize() {
@Override
public RealMatrix calculate(final IterableRegion<B> input) {
final BlockRealMatrix output = new BlockRealMatrix(3, 3);
Cursor<Void> c = input.localizingCursor();
Cursor<Void> c = input.inside().localizingCursor();
double[] pos = new double[3];
double[] computedCentroid = new double[3];
centroid.calculate(input).localize(computedCentroid);
Expand All @@ -87,7 +87,7 @@ public RealMatrix calculate(final IterableRegion<B> input) {
output.setEntry(2, 1, output.getEntry(1, 2));
}

final double size = input.size();
final double size = input.inside().size();
output.setEntry(0, 0, output.getEntry(0, 0) / size);
output.setEntry(0, 1, output.getEntry(0, 1) / size);
output.setEntry(0, 2, output.getEntry(0, 2) / size);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void compute(final RandomAccessibleInterval<T> in, final ImgLabeling<Inte
final List<Long> imiList = new ArrayList<>();

if (mask != null) {
final Cursor<Void> c = Regions.iterable(mask).localizingCursor();
final Cursor<Void> c = Regions.iterable(mask).inside().localizingCursor();
while (c.hasNext()) {
c.next();
imiList.add(IntervalIndexer.positionToIndex(c, in));
Expand Down

0 comments on commit 813b6a9

Please sign in to comment.