class_docstr: MultiSubjectParcellation class are used to represent parcels
  that can have different spatial different contours
  in a given group of subject
  It consists of
  self.domain: the specification of a domain
  self.template_labels the specification of a template parcellation
  self.individual_labels the specification of individual parcellations
  
  fixme:should inherit from mroi.MultiROI
docstr: Initialize multi-subject parcellation
  
  Parameters
  ----------
  domain: discrete_domain.DiscreteDomain instance,
          definition of the space considered in the parcellation
  template_labels: array of shape domain.size, optional
                   definition of the template labelling
  individual_labels: array of shape (domain.size, nb_subjects), optional,
                     the individual parcellations
                     corresponding to the template
  nb_parcel: int, optional,
             number of parcels in the model
             can be inferred as template_labels.max()+1, or 1 by default
             cannot be smaller than template_labels.max()+1
code: def __init__(
      self,
      domain,
      template_labels=None,
      individual_labels=None,
      nb_parcel=None,
  ):
      """Initialize multi-subject parcellation
  
      Parameters
      ----------
      domain: discrete_domain.DiscreteDomain instance,
              definition of the space considered in the parcellation
      template_labels: array of shape domain.size, optional
                       definition of the template labelling
      individual_labels: array of shape (domain.size, nb_subjects), optional,
                         the individual parcellations
                         corresponding to the template
      nb_parcel: int, optional,
                 number of parcels in the model
                 can be inferred as template_labels.max()+1, or 1 by default
                 cannot be smaller than template_labels.max()+1
      """
      self.domain = domain
      self.template_labels = template_labels
      self.individual_labels = individual_labels
      self.nb_parcel = 1
      if template_labels is not None:
          self.nb_parcel = template_labels.max() + 1
      if nb_parcel is not None:
          self.nb_parcel = nb_parcel
  
      self.check()
      self.nb_subj = 0
      if individual_labels is not None:
          if individual_labels.shape[0] == individual_labels.size:
              self.individual_labels = individual_labels[:, np.newaxis]
          self.nb_subj = self.individual_labels.shape[1]
  
      self.features = {}
  
file_path: nipy/nipy/labs/spatial_models/parcellation.py
imports: from warnings import warn
  import numpy
label_desc: Use image node_id 1 to create a new MultiSubjectParcellation object  with example: obj = MultiSubjectParcellation(domain, template_labels, individual_labels, nb_parcel)