-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start improving the tiling strategy and usage
- Loading branch information
1 parent
d6aed6f
commit f51cf42
Showing
7 changed files
with
104 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/io/bioimage/modelrunner/tiling/TileCalculator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.bioimage.modelrunner.tiling; | ||
|
||
import java.util.List; | ||
|
||
import io.bioimage.modelrunner.bioimageio.description.ModelDescriptor; | ||
|
||
public class TileCalculator { | ||
|
||
private final List<TileInfo> tileInfoList; | ||
|
||
private final ModelDescriptor descriptor; | ||
|
||
private TileCalculator(ModelDescriptor descriptor, List<TileInfo> tileInfoList) { | ||
this.descriptor = descriptor; | ||
this.tileInfoList = tileInfoList; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/main/java/io/bioimage/modelrunner/tiling/TileInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package io.bioimage.modelrunner.tiling; | ||
|
||
public class TileInfo { | ||
|
||
|
||
private final String name; | ||
|
||
private final long[] imDims; | ||
|
||
private final long[] proposedTileDims; | ||
|
||
private final String imAxesOrder; | ||
|
||
private final String tileAxesOrder; | ||
|
||
private TileInfo(String tensorName, long[] imDims, String imAxesOrder, long[] proposedTileDims, String tileAxesOrder) { | ||
this.name = tensorName; | ||
this.imAxesOrder = imAxesOrder; | ||
this.imDims = imDims; | ||
this.proposedTileDims = proposedTileDims; | ||
this.tileAxesOrder = tileAxesOrder; | ||
} | ||
|
||
/** | ||
* @return the name | ||
*/ | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* @return the imDims | ||
*/ | ||
public long[] getImageDimensions() { | ||
return imDims; | ||
} | ||
|
||
/** | ||
* @return the proposedTileDims | ||
*/ | ||
public long[] getProposedTileDimensions() { | ||
return proposedTileDims; | ||
} | ||
|
||
/** | ||
* @return the imAxesOrder | ||
*/ | ||
public String getImageAxesOrder() { | ||
return imAxesOrder; | ||
} | ||
|
||
/** | ||
* @return the tileAxesOrder | ||
*/ | ||
public String getTileAxesOrder() { | ||
return tileAxesOrder; | ||
} | ||
|
||
|
||
|
||
} |