4. astec_mars

4.1. Mars method overview

The name mars comes from [FDM+10] where MARS is the acronym of multiangle image acquisition, 3D reconstruction and cell segmentation.

This method aims at producing a segmentation of a membrane cell image (e.g. a fused image) into a segmentation image. This segmentation image is a integer-valued image where each integer labeled an unique cell in the image. By convention, ‘1’ is the background label, while cells have labels greater than 2. It is made of the following steps:

  1. Pre-processing of the input image to produce the input seed image for seed computation. This is described in section Image preprocessing. The parameters that governed the pre-processing are described in section Preprocessing parameters and prefixed by seed_.

  2. Seed extraction through the computation of the h-minima of the input seed image.

  3. Eventually seed correction.

  4. Pre-processing of the input image to produce the input membrane image for the seeded watershed, similarly to the pre-processing of the input seed image. The parameters that governed the pre-processing are prefixed by membrane_.

  5. A seeded watershed.

4.2. Mars / output data

The results are stored in sub-directories SEG/SEG_<EXP_SEG> under the /path/to/experiment/ directory where where <EXP_SEG> is the value of the variable EXP_SEG (its default value is 'RELEASE').

/path/to/experiment/
├── ...
├── SEG/
│  └── SEG_<EXP_SEG>/
│     ├── <EN>_mars_t<begin>.inr
│     ├── LOGS/
│     └── RECONSTRUCTION/
...

4.3. Steps 1 and 4: input image pre-processing

The input image (typically the fused image representing the cell membranes/walls) can be pre-processed before use in the seeded watershed.The pre-processing can be different for the seed input image (the one that will be used to extract the seeds) and the membrane input image (the one that will be used as the height image for the seeded watershed). Details about the pre-processing can be found in section Image preprocessing.

Default settings are

intensity_transformation = 'Identity'
intensity_enhancement = None

meaning that the original fused image is used for both inputs. Different pre-processing can be done. E.g.

seed_intensity_transformation = 'Identity'
membrane_intensity_transformation = 'normalization_to_u8'
intensity_enhancement = None

comes to use the original image for the seed extraction, but its normalization into 8 bits (1 byte) as the height image for the seeded watershed.

If the input image is transformed before segmented, the transformed images can be saved in the directory SEG/SEG_<EXP_SEG>/RECONSTRUCTION/ if the value of the variable keep_reconstruction is set to True.

4.4. Step 2: seed extraction

The seed extraction is made of the following steps:

  1. Gaussian smoothing of the input image, the gaussian standard deviation being given by the variable seed_sigma.

  2. Extraction of the h-minima of the previous image, h being given by the variable seed_hmin.

  3. Hysteresis thresholding (and labeling) of the h-minima image, with a high threshold equal to seed_high_threshold (default is h) and and a low threshold equal to 1. It then only selects the h-minima that have an actual depth of h.

4.5. Step 3: seed correction

Several rounds of correction of the computed seeds can be done. At each round, different seeds can be assigned the same label (and this will fuse the further reconstructed cells) or new seeds (each new seed is a single voxel) can be added. See the seed_edition_file variable for details (section Seed edition parameters).

When correcting seeds, it is advised to launch astec_mars with the -k option. Indeed, temporary files, as the seed image, are kept in a temporary directory located in the SEG/SEG_'EXP_SEG'/ directory and then re-used, and not recomputed at each astec_mars use.

Alternatively, segmentation correction can be performed with astec_manualcorrection (section astec_manualcorrection).

4.6. Step 5 : seeded watershed

Given the seeds, the watershed is performed on the smoothed input membrane image (gaussian standard deviation being given by the variable membrane_sigma).