channel               package:EBImage               R Documentation

_C_o_l_o_r _a_n_d _i_m_a_g_e _c_o_l_o_r _m_o_d_e _c_o_n_v_e_r_s_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     'channel' handles color space conversions between image modes.
     'rgbImage' combines 'Grayscale' images into a 'Color' one.

_U_s_a_g_e:

      
       channel(x, mode)
       rgbImage(red, green, blue)

_A_r_g_u_m_e_n_t_s:

       x: An 'Image' object or an array.

    mode: A character value specifying the target mode for conversion.
          See Details.

red, green, blue: 'Image' objects in 'Grayscale' color mode or arrays
          of the same dimension. If missing, a black image will be
          used.

_D_e_t_a_i_l_s:

     Conversion modes:

     '_r_g_b' Converts a 'Grayscale' image or an array into a 'Color'
          image, replicating RGB channels.

     '_g_r_a_y, _g_r_e_y' Converts a 'Color' image into a 'Grayscale' image,
          using uniform 1/3 RGB weights.

     '_r_e_d, _g_r_e_e_n, _b_l_u_e' Extracts the 'red', 'green' or 'blue' channel
          from a 'Color' image. Returns a 'Grayscale' image.

     '_a_s_r_e_d, _a_s_g_r_e_e_n, _a_s_b_l_u_e' Converts a 'Grayscale' image or an array
          into a 'Color' image of the specified hue.

     'channel' changes the pixel intensities, unlike 'colorMode' which
     just changes the way that EBImage should render an image,

_V_a_l_u_e:

     An 'Image' object or an array.

_A_u_t_h_o_r(_s):

     Oleg Sklyar, osklyar@ebi.ac.uk

_S_e_e _A_l_s_o:

     'colorMode'

_E_x_a_m_p_l_e_s:

      x = readImage(system.file("images", "shapes.png", package="EBImage"))
      if (interactive()) display(x)
      y = channel(x, 'asgreen')
      if (interactive()) display(y)

      ## rgbImage
      x = readImage(system.file('images', 'nuclei.tif', package='EBImage'))
      y = readImage(system.file('images', 'cells.tif', package='EBImage'))
      if (interactive()) display(x, title='Cell nuclei')
      if (interactive()) display(y, title='Cell bodies')

      cells = rgbImage(green=1.5*y, blue=x)
      if (interactive()) display(cells, title='Cells')

