Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

tiff_auto3dseg

Gabriele Girelli edited this page Oct 18, 2018 · 3 revisions

The tiff_auto3dseg script can be used to perform automatic 3D segmentation of DNA staining.

Images are first identified based on a regular expression matching the file name. Then, they are first re-scaled if deconvolved with Huygens software, then a global (Otsu) and local (median) thresholds are combined to binarize the image in 3D. Then, holes are filled in 3D and a closing operation is performed to remove small objects. Objects are filtered based on volume and Z size, and those touching the XY contour of the image are discarded. The generated images have identified objects labeled with different intensity levels.

Run tiff_auto3dseg -h for more details on how to produce binary/labeled (compressed) masks of your nuclei stain channels

Automatic segmentation pipeline

  1. Image is read and re-scaled if needed.
  2. Both global and local (--neighbour) segmentations are performed and combined.
  3. 2D mask is combined and applied (with a logical_and operation) to every slice in the Z-stack, if available (-2). If the 2D mask is labeled, the labels are retained through the whole process.
  4. Objects touching the XY (and Z, if specified by the user with --clear-Z) borders are removed.
  5. Holes are filled in a slice-by-slice manner.
  6. Segmented objects are filtered based on their XY (actually, volume) compared to the provided radius range (--radius). Default radius range being: 10px to infinity. Any volume in the range of volume of sphere with the specified radii is kept.
  7. Segmented objects are filtered based on their size over Z dimension (either absolute number of slices or size relative to the stack), as specified by the user (--min-Z).
  8. Dilate-fill-erode operation is performed if specified by the user. Default: dilate/erode with radius 10.
  9. Output is labeled (--labeled) and compressed (--compressed) if so requested.