Package qupath.lib.objects.hierarchy
Class DefaultTMAGrid
java.lang.Object
qupath.lib.objects.hierarchy.DefaultTMAGrid
- All Implemented Interfaces:
Serializable
,TMAGrid
Default implementation of a TMAGrid.
- Author:
- Pete Bankhead
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic TMAGrid
create
(List<TMACoreObject> cores, int gridWidth) Create a new TMAGrid based on a list of cores and grid width.int
Number of cores along the vertical axis of the grid.int
Number of cores along the horizontal axis of the grid.getTMACore
(int row, int col) Get the TMACoreObject for a specified grid location.getTMACore
(String coreName) Retrieve a TMA core based upon its name.Get an unmodifiable list of all TMA core objects.int
nCores()
Total number of cores in the TMA grid.toString()
-
Method Details
-
create
Create a new TMAGrid based on a list of cores and grid width.It is assumed that the grid height may be calculated as
cores.size() / gridWidth
.- Parameters:
cores
-gridWidth
-- Returns:
-
nCores
public int nCores()Description copied from interface:TMAGrid
Total number of cores in the TMA grid. -
getGridWidth
public int getGridWidth()Description copied from interface:TMAGrid
Number of cores along the horizontal axis of the grid.- Specified by:
getGridWidth
in interfaceTMAGrid
- Returns:
-
getGridHeight
public int getGridHeight()Description copied from interface:TMAGrid
Number of cores along the vertical axis of the grid.- Specified by:
getGridHeight
in interfaceTMAGrid
- Returns:
-
getTMACore
Description copied from interface:TMAGrid
Get the TMACoreObject for a specified grid location.- Specified by:
getTMACore
in interfaceTMAGrid
- Parameters:
row
-col
-- Returns:
-
getTMACoreList
Description copied from interface:TMAGrid
Get an unmodifiable list of all TMA core objects.- Specified by:
getTMACoreList
in interfaceTMAGrid
- Returns:
-
getTMACore
Description copied from interface:TMAGrid
Retrieve a TMA core based upon its name.The behavior is undefined if multiple cores have the same name.
- Specified by:
getTMACore
in interfaceTMAGrid
- Parameters:
coreName
-- Returns:
-
toString
-