propagate              package:EBImage              R Documentation

_V_o_r_o_n_o_i-_b_a_s_e_d _s_e_g_m_e_n_t_a_t_i_o_n _o_n _i_m_a_g_e _m_a_n_i_f_o_l_d_s

_D_e_s_c_r_i_p_t_i_o_n:

     Find boundaries between adjacent regions in an image, where seeds
     have been already identified in the individual regions to be
     segmented. The method finds the Voronoi region of each seed on a
     manifold with a metric controlled by local image properties. The
     method is motivated by the problem of finding the borders of cells
     in microscopy images, given a labelling of the nuclei in the
     images.

     Algorithm and implementation are from Jones et al. [1].

_U_s_a_g_e:

       propagate(x, seeds, mask=NULL, lambda=1e-4, ext, seed.centers)

_A_r_g_u_m_e_n_t_s:

       x: An 'Image' object or an array, containing the image to
          segment.

   seeds: An 'Image' object or an array, containing the seeding objects
          of the already identified regions.

    mask: An optional 'Image' object or an array, containing the binary
          image mask of the regions that can be segmented. If missing, 
          the whole image is segmented.

  lambda: A numeric value. The regularisation parameter used in the
          metric, determining the trade-off between the Euclidian
          distance in the image plane and the contribution of the
          gradient of 'x'. See details.

     ext: Deprecated.

seed.centers: Deprecated.

_D_e_t_a_i_l_s:

     The method operates by computing a discretized approximation of
     the Voronoi regions for given seed points on a Riemann manifold
     with a metric controlled by local image features.

     Under this metric, the infinitesimal distance d between points v
     and v+dv is defined by: 

     d^2 = ( (t(dv)*g)^2 + lambda*t(dv)*dv )/(lambda + 1) , where g is
     the gradient of image 'x' at point v.

     'lambda' controls the weight of the Euclidian distance term.  When
     'lambda' tends to infinity, d tends to the Euclidian distance.
     When 'lambda' tends to 0, d tends to the intensity gradient of the
     image.

     To avoid to rely too much on single noisy pixels, the gradient is
     computed on a neighborhood of 3x3 pixels.

     Segmentation of the Voronoi regions in the vicinity of flat areas
     (having a null gradient) with small values of 'lambda' can suffer
     from artefacts coming from the metric approximation.

_V_a_l_u_e:

     An 'Image' object or an array, containing the labelled objects.

_L_i_c_e_n_s_e:

     The implementation is based on CellProfiler C++ source code [2,
     3]. An LGPL license was granted by Thouis Jones to use this part
     of CellProfiler's code for the 'propagate' function.

_A_u_t_h_o_r(_s):

     Original CellProfiler code: Anne Carpenter <carpenter@wi.mit.edu>,
     Thouis Jones <thouis@csail.mit.edu>, In Han Kang <inthek@mit.edu>.

     Port for this package: Oleg Sklyar, Gregoire Pau, Wolfgang Huber

_R_e_f_e_r_e_n_c_e_s:

     [1] T. Jones, A. Carpenter and P. Golland, "Voronoi-Based
     Segmentation of Cells on Image Manifolds", CVBIA05 (535-543), 2005

     [2] A. Carpenter, T.R. Jones, M.R. Lamprecht, C. Clarke, I.H.
     Kang, O. Friman, D. Guertin, J.H. Chang, R.A. Lindquist, J.
     Moffat, P. Golland and D.M. Sabatini, "CellProfiler: image
     analysis software for identifying and quantifying cell
     phenotypes", Genome Biology 2006, 7:R100

     [3] CellProfiler: http://www.cellprofiler.org

_S_e_e _A_l_s_o:

     'bwlabel', 'watershed'

_E_x_a_m_p_l_e_s:

     ## a paraboloid mountain in a plane
     n = 400
     x = (n/4)^2 - matrix(
            (rep(1:n, times=n) - n/2)^2 + (rep(1:n, each=n) - n/2)^2,
            nrow=n, ncol=n)
     x = normalize(x)

     ## 4 seeds
     seeds = array(0, dim=c(n,n))
     seeds[51:55, 301:305] = 1
     seeds[301:305, 101:105] = 2
     seeds[201:205, 141:145] = 3
     seeds[331:335, 351:355] = 4

     lambda = 10^seq(-8, -1, by=1)
     segmented = Image(dim=c(dim(x), length(lambda)))

     for(i in seq(along=lambda)) {
       prop = propagate(x, seeds, lambda=lambda[i])
       prop = prop/max(prop)
       segmented[,,i] = prop
     }

     if(interactive()){
       display(x, title='Image')
       display(seeds/max(seeds), title='Seeds')
       display(segmented, title="Voronoi regions")
     }

