Skip to content

BioimageAnalysisCoreWEHI/export_multiplex_image_tiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

export_multiplex_image_tiles

Nextflow pipeline for exporting tiles from images in a QuPath project using QuPath headless mode and TileExporter.

What it does

  • Runs QuPath from CLI in headless mode.
  • Iterates through all images in a .qpproj project.
  • Exports image tiles using user-defined tile size and overlap.
  • Creates one folder per image containing that image's tile files.

Required parameters

  • --project Path to QuPath project (.qpproj).
  • --tile_size Tile size in pixels (for example 1024).
  • --tile_overlap Tile overlap in pixels (for example 128).

Optional:

  • --qupath_bin Path to QuPath executable (default: /stornext/System/data/software/rhel/9/base/tools/QuPath/0.6.0/bin/QuPath).
  • --script Groovy script path (default: bin/export_image_tiles.groovy). Relative paths are resolved from the pipeline directory.
  • --downsample Downsample factor for tile export (default: 1.0).
  • --include_partial_tiles Include edge tiles smaller than tile size (default: true).
  • --outdir Output directory (default: results).

Usage

Run on HPC with Singularity and medium resources:

nextflow run main.nf \
	-profile singularity,medium \
	--project /path/to/project.qpproj \
	--qupath_bin /stornext/System/data/software/rhel/9/base/tools/QuPath/0.6.0/bin/QuPath \
	--tile_size 1024 \
	--tile_overlap 128 \
	--downsample 1.0 \
	--include_partial_tiles true \
	--outdir /path/to/output

Outputs

  • tiles/ output directory containing one folder per image in the QuPath project.
  • Per-image folder names are sanitized from QuPath image names.
  • qupath_tile_export.log with the full QuPath export log.

Merging tile GeoJSON back to full-image GeoJSON

Use bin/merge_tile_geojson.py after segmentation on tiles.

Example:

python bin/merge_tile_geojson.py \
	--input-dir /path/to/tile_geojson \
	--output-dir /path/to/merged_geojson \
	--overlap 200 \
	--core-filter \
	--dedup-iou 0.4

Notes:

  • The script parses tile offsets from filenames like [x=824,y=1648,w=1024,h=400].
  • It shifts polygons into global coordinates before merging.
  • --core-filter keeps objects whose centroid falls in the non-overlap core of each tile.
  • --dedup-iou applies NMS-style duplicate removal in overlap regions.

About

Nextflow pipeline for exporting tiles from very large COMET and OPAL images for segmentation and phenotyping

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors