Skip to content

Commit

Permalink
morphology/strel/EllipsoidStrel: fix computation of offset
Browse files Browse the repository at this point in the history
  • Loading branch information
dlegland committed Feb 7, 2024
1 parent 63c2ee0 commit 355b6c8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/java/inra/ijpb/morphology/strel/EllipsoidStrel.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,14 @@ public int[][][] getMask3D()
return mask;
}

@Override
public int[] getOffset()
{
int intRadius = (int) Math.round(xRadius);
return new int[]{intRadius, intRadius, intRadius};
}
@Override
public int[] getOffset()
{
int intRadiusX = (int) Math.round(xRadius);
int intRadiusY = (int) Math.round(yRadius);
int intRadiusZ = (int) Math.round(zRadius);
return new int[] { intRadiusX, intRadiusY, intRadiusZ };
}

@Override
public int[][] getShifts3D()
Expand Down

0 comments on commit 355b6c8

Please # to comment.