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')

