Class DefaultTMAGrid

java.lang.Object
qupath.lib.objects.hierarchy.DefaultTMAGrid
All Implemented Interfaces:
Serializable, TMAGrid

public class DefaultTMAGrid extends Object implements TMAGrid
Default implementation of a TMAGrid.
Author:
Pete Bankhead
See Also:
  • Method Details

    • create

      public static TMAGrid create(List<TMACoreObject> cores, int gridWidth)
      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.
      Specified by:
      nCores in interface TMAGrid
      Returns:
    • getGridWidth

      public int getGridWidth()
      Description copied from interface: TMAGrid
      Number of cores along the horizontal axis of the grid.
      Specified by:
      getGridWidth in interface TMAGrid
      Returns:
    • getGridHeight

      public int getGridHeight()
      Description copied from interface: TMAGrid
      Number of cores along the vertical axis of the grid.
      Specified by:
      getGridHeight in interface TMAGrid
      Returns:
    • getTMACore

      public TMACoreObject getTMACore(int row, int col)
      Description copied from interface: TMAGrid
      Get the TMACoreObject for a specified grid location.
      Specified by:
      getTMACore in interface TMAGrid
      Parameters:
      row -
      col -
      Returns:
    • getTMACoreList

      public List<TMACoreObject> getTMACoreList()
      Description copied from interface: TMAGrid
      Get an unmodifiable list of all TMA core objects.
      Specified by:
      getTMACoreList in interface TMAGrid
      Returns:
    • getTMACore

      public TMACoreObject getTMACore(String coreName)
      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 interface TMAGrid
      Parameters:
      coreName -
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object