original_docstring: Helper function for plotting regions of interest ROIs in contours.
  
      Parameters
      ----------
      display : nilearn.plotting.displays.OrthoSlicer, object
          An object with background image on which contours are shown.
  
      roi_img : Niimg-like object
          See http://nilearn.github.io/manipulating_images/input_output.html
          The ROI/mask image, it could be binary mask or an atlas or ROIs
          with integer values.
  
      cmap : matplotlib colormap
          The colormap for the atlas maps.
  
      alpha : float between 0 and 1
          Alpha sets the transparency of the color inside the filled
          contours.
  
      linewidths : float
          This option can be used to set the boundary thickness of the
          contours.
  
      Returns
      -------
      display : nilearn.plotting.displays.OrthoSlicer, object
          Contours displayed on the background image.
  
      
docstring: Helper function for plotting regions of interest ROIs in contours.
  Parameters
  
  display : nilearn.plotting.displays.OrthoSlicer, object
  An object with background image on which contours are shown.
  
  
  
  cmap : matplotlib colormap
  The colormap for the atlas maps.
  
  alpha : float between 0 and 1
  Alpha sets the transparency of the color inside the filled
  contours.
  
  linewidths : float
  This option can be used to set the boundary thickness of the
  contours.
  
  Returns
  
  display : nilearn.plotting.displays.OrthoSlicer, object
  Contours displayed on the background image.
docstring_tokens: Helper function for plotting regions of interest ROIs in contours . Parameters display : nilearn . plotting . displays . OrthoSlicer object An object with background image on which contours are shown . cmap : matplotlib colormap The colormap for the atlas maps . alpha : float between 0 and 1 Alpha sets the transparency of the color inside the filled contours . linewidths : float This option can be used to set the boundary thickness of the contours . Returns display : nilearn . plotting . displays . OrthoSlicer object Contours displayed on the background image .
code: def _plot_roi_contours(display, roi_img, cmap, alpha, linewidths):
      """Helper function for plotting regions of interest ROIs in contours.
  
      Parameters
      ----------
      display : nilearn.plotting.displays.OrthoSlicer, object
          An object with background image on which contours are shown.
  
      roi_img : Niimg-like object
          See http://nilearn.github.io/manipulating_images/input_output.html
          The ROI/mask image, it could be binary mask or an atlas or ROIs
          with integer values.
  
      cmap : matplotlib colormap
          The colormap for the atlas maps.
  
      alpha : float between 0 and 1
          Alpha sets the transparency of the color inside the filled
          contours.
  
      linewidths : float
          This option can be used to set the boundary thickness of the
          contours.
  
      Returns
      -------
      display : nilearn.plotting.displays.OrthoSlicer, object
          Contours displayed on the background image.
  
      """
      roi_img = _utils.check_niimg_3d(roi_img)
      roi_data = get_data(roi_img)
      labels = np.unique(roi_data)
      cmap = plt.cm.get_cmap(cmap)
      color_list = cmap(np.linspace(0, 1, len(labels)))
      for idx, label in enumerate(labels):
          if label == 0:
              continue
          data = (roi_data == label)
          data = data.astype(int)
          img = new_img_like(roi_img, data, affine=roi_img.affine)
          display.add_contours(img, levels=[0.5], colors=[color_list[idx - 1]],
                               alpha=alpha, linewidths=linewidths,
                               linestyles='solid')
      return display
code_tokens: def _plot_roi_contours ( display , roi_img , cmap , alpha , linewidths ) : roi_img = _utils . check_niimg_3d ( roi_img ) roi_data = get_data ( roi_img ) labels = np . unique ( roi_data ) cmap = plt . cm . get_cmap ( cmap ) color_list = cmap ( np . linspace ( 0 , 1 , len ( labels ) ) ) for idx , label in enumerate ( labels ) : if label == 0 : continue data = ( roi_data == label ) data = data . astype ( int ) img = new_img_like ( roi_img , data , affine = roi_img . affine ) display . add_contours ( img , levels = [ 0.5 ] , colors = [ color_list [ idx - 1 ] ] , alpha = alpha , linewidths = linewidths , linestyles = 'solid' ) return display
short_docstring: Helper function for plotting regions of interest ROIs in contours.
short_docstring_tokens: Helper function for plotting regions of interest ROIs in contours .
comment: """Helper function for plotting regions of interest ROIs in contours.
  
      Parameters
      ----------
      display : nilearn.plotting.displays.OrthoSlicer, object
          An object with background image on which contours are shown.
  
      roi_img : Niimg-like object
          See http://nilearn.github.io/manipulating_images/input_output.html
          The ROI/mask image, it could be binary mask or an atlas or ROIs
          with integer values.
  
      cmap : matplotlib colormap
          The colormap for the atlas maps.
  
      alpha : float between 0 and 1
          Alpha sets the transparency of the color inside the filled
          contours.
  
      linewidths : float
          This option can be used to set the boundary thickness of the
          contours.
  
      Returns
      -------
      display : nilearn.plotting.displays.OrthoSlicer, object
          Contours displayed on the background image.
  
      """