introvoyz041's picture
Migrated from GitHub
5ad11ec verified

Nuclei Segmentation

Installation

First, you can copy supporting plugins from this directory into your ImageJ/plugins/ folder. After that, your plugins folder will contains: utilities plugins at: ImageJ/plugins/3D_suite,ImageJ/plugins/3D_viewer,ImageJ/plugins/utils, and main plugin for this computation at: ImageJ/plugins/spatial3dtissuej_plugin/TissueJ4Merfish_v14.jar. Note: please use the latest package in this folder.

Run scripts

  • Option 1: manual option: you can run macro by opening nuclei segmentation macro from ImageJ, and change input directory, input parameters and run macro.
  • Option 2: background mode, using shell script to run program under background mode. See setting instruction in this file for different OS system. Note: java program will pop up a Java icon during the run, so program require X11 display syste, if you run this program from server, you need to install virtual environment xvfb-run in order to run it. See details in shell script.
  • Option 2: background mode. Similar to the second option above. But in case you have large number of input images, you can divide images into multiple folders, ex: 3 folders, and run shell script from each folder. Program will use multiple threads from your computer, so execution time will be much faster.

Parameters

  • Nuclei segmentation: minSize minimum diameter of a nucleus, maxSize maximum diameter of a nucleus. Tell program that objects we expect are in this range. So program can work better.
  • suffixe usually .tif or .tiff. Tell program to scan entire folder to get the list of input files, and only file that ends with this suffixe will be taken into account.
  • radius_max_cell_zone_extension: for cell zone estimation step, from the periphery of a nucleus, extending into space with max radius to use as a cell membrane area.

Testing dataset

  • You can run a testing example from this git repo first, before moving to your input images. See Testing dataset
  • Output of nuclei segmentation for this testing dataset is at directory
  • Output of ROI: region of interest, nuclei contours from segmented results will be at directory. It helps to debug program, and see the performance of algo. Note: you can comment this function from bottom part of script if you don't need it macro
  • Output of cell zone detection will be stored at directory with two different formats: .tif and .zip. ZIP format is much smaller file compared to .tif. You can keep one only .zip format if you don't have space, and open .zip image from ImageJ.