Package qupath.lib.objects.utils
Class Tiler
java.lang.Object
qupath.lib.objects.utils.Tiler
A class used to split 
ROI or Geometry objects into rectangular tiles.
 This is useful for breaking up large images into manageable pieces.
 The Tiler is immutable and threadsafe.
- Since:
- v0.5.0
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic enumEnum representing the possible alignments for tiles.
- 
Method SummaryModifier and TypeMethodDescriptionstatic Tiler.Builderbuilder(int tileSize) Create a new builder to generate square tiles.static Tiler.Builderbuilder(int tileWidth, int tileHeight) Create a new builder to generate rectangular tiles.static Tiler.BuilderCreate a new builder initialized with the settings from an existing Tiler.createAnnotations(ROI parent) Create a list ofPathAnnotationObjecttiles from the input.createGeometries(Geometry parent) Create a list ofGeometrytiles from the input.createObjects(ROI parent, Function<ROI, PathObject> creator) Create a list ofPathObjecttiles from the input.createROIs(ROI parent) Create a list ofROItiles from the input.createTiles(ROI parent) Create a list ofPathTileObjecttiles from the input.Get the tiling alignment.booleanCheck if the tiler is set to crop the output to the input parent.booleanCheck if the tiler will filter the output based on whether the centroid of tiles lies within the parentintGet the height of output tilesintGet the width of output tiles
- 
Method Details- 
getTileWidthpublic int getTileWidth()Get the width of output tiles- Returns:
- the width in pixels
 
- 
getTileHeightpublic int getTileHeight()Get the height of output tiles- Returns:
- the height in pixels
 
- 
getCropToParentpublic boolean getCropToParent()Check if the tiler is set to crop the output to the input parent.- Returns:
- whether the tiler is set to crop output to the parent object
 
- 
getAlignmentGet the tiling alignment.- Returns:
- The current setting
 
- 
getFilterByCentroidpublic boolean getFilterByCentroid()Check if the tiler will filter the output based on whether the centroid of tiles lies within the parent- Returns:
- The current setting
 
- 
createGeometriesCreate a list ofGeometrytiles from the input. These may not all be rectangular based on the settings used.- Parameters:
- parent- the object that will be split into tiles.
- Returns:
- a list of tiles
 
- 
createROIsCreate a list ofROItiles from the input. These may not all be rectangular based on the settings used.- Parameters:
- parent- the object that will be split into tiles.
- Returns:
- a list of tiles
 
- 
createObjectsCreate a list ofPathObjecttiles from the input. These may not all be rectangular based on the settings used.- Parameters:
- parent- the object that will be split into tiles.
- creator- a function used to create the desired type of- PathObject
- Returns:
- a list of tiles
 
- 
createTilesCreate a list ofPathTileObjecttiles from the input. These may not all be rectangular based on the settings used.- Parameters:
- parent- the object that will be split into tiles.
- Returns:
- a list of tiles
 
- 
createAnnotationsCreate a list ofPathAnnotationObjecttiles from the input. These may not all be rectangular based on the settings used.- Parameters:
- parent- the object that will be split into tiles.
- Returns:
- a list of tiles
 
- 
builderCreate a new builder to generate square tiles.- Parameters:
- tileSize- the width and height of the tiles, in pixels
- Returns:
- a new builder
 
- 
builderCreate a new builder to generate rectangular tiles.- Parameters:
- tileWidth- the width of the tiles, in pixels
- tileHeight- the height of the tiles, in pixels
- Returns:
- a new builder
 
- 
builderCreate a new builder initialized with the settings from an existing Tiler. Because tilers are immutable, this is the only way to change the settings.- Parameters:
- tiler- the tiler that provides initial settings
- Returns:
- a new builder
 
 
-