diff --git a/src/main/java/io/bioimage/modelrunner/tiling/TileGrid.java b/src/main/java/io/bioimage/modelrunner/tiling/TileGrid.java index 5cfec00f..572f80cb 100644 --- a/src/main/java/io/bioimage/modelrunner/tiling/TileGrid.java +++ b/src/main/java/io/bioimage/modelrunner/tiling/TileGrid.java @@ -36,7 +36,7 @@ public class TileGrid { /** - * Size of the input patch. Following the tensor axes order + * Size of the tile for a tensor. Following the tensor axes order */ private long[] tileSize; /** @@ -49,10 +49,22 @@ public class TileGrid */ private String tensorName; + /** + * The position of the closest corner to the center for each of the tiles with + * respect to the original image of the tensor. + * The positions might be negative as the image that is going to be processed might have padding on the edges + */ private List tilePostionsInImage = new ArrayList(); + /** + * The positions of the roi in each of the tiles that are going to be used + */ private List roiPositionsInTile = new ArrayList(); + /** + * The positions of the roi of each of the tiles in the original image. Where the ROIs are + * inserted on the original image. + */ private List roiPositionsInImage = new ArrayList(); @@ -61,6 +73,13 @@ private TileGrid() } /** + * Calculate the positions of each of the tiles that are going to be used to process the whole image. + * + * @param tileSpecs + * instance of {@link PatchSpec} that contains the info about the size of the original image, and the + * size of the tiles that are going to be used + * @return an instance of {@link TileGrid} that contains the information about where the tiles need to be + * positioned with respect to the original image */ public static TileGrid create(PatchSpec tileSpecs) { @@ -90,26 +109,53 @@ public static TileGrid create(PatchSpec tileSpecs) return ps; } + /** + * + * @return name of the tensor that is going to be processed + */ public String getTensorName() { return tensorName; } + /** + * + * @return size of the tile that is going to be used to process the image + */ public long[] getTileSize() { return this.tileSize; } + /** + * + * @return size of the roi of each of the tiles that is going to be used to process the image + */ public int[] getRoiSize() { return this.roiSize; } + /** + * + * @return the position of the closest corner to the center for each of the tiles with + * respect to the original image of the tensor. + * The positions might be negative as the image that is going to be processed might have padding on the edges + */ public List getTilePostionsInImage() { return this.tilePostionsInImage; } + /** + * + * @return the positions of the roi in each of the tiles that are going to be used + */ public List getRoiPositionsInTile() { return this.roiPositionsInTile; } + /** + * + * @return the positions of the roi of each of the tiles in the original image. Where the ROIs are + * inserted on the original image. + */ public List getRoiPostionsInImage() { return this.roiPositionsInImage; }