{"action":"created","comment":{"url":"https://api.github.com/repos/nilearn/nilearn/pulls/comments/43264516","id":43264516,"diff_hunk":"@@ -0,0 +1,480 @@\n+\"\"\"\n+Better brain parcellations for Region of Interest analysis\n+\"\"\"\n+\n+import nibabel\n+import numpy as np\n+\n+from scipy.ndimage import label\n+from scipy.stats import scoreatpercentile\n+\n+from sklearn.base import clone\n+from sklearn.externals.joblib import Memory\n+\n+from .. import masking\n+from ..input_data import NiftiMasker, NiftiMapsMasker\n+from ..input_data.nifti_masker import filter_and_mask\n+from .._utils import check_niimg, check_niimg_3d, check_niimg_4d\n+from .._utils.extmath import fast_abs_percentile\n+from .._utils.class_inspect import get_params\n+from ..image import iter_img, new_img_like\n+from ..image.image import _smooth_array\n+from .._utils.niimg_conversions import concat_niimgs\n+from .._utils.compat import _basestring\n+from ..externals.skimage import peak_local_max, random_walker\n+\n+\n+def estimate_apply_threshold_to_maps(maps_img, mask_img=None, parameters=None,\n+                                     threshold='auto',\n+                                     thresholding_strategy='percentile'):\n+    \"\"\" A function which keeps the most prominent regions of the maps. Can also\n+    be denoted as foreground objects/regions extraction.\n+\n+    Parameters\n+    ----------\n+    maps_img: a 3D/4D Nifti like image/object\n+        a path or filename or an image consists of statistical maps.\n+\n+    mask_img: a Nifti like image/object, default is None\n+        a path or filename or a mask image. To make sure that we keep regions\n+        which are within the brain volume.\n+        If given, maps are masked with this image or if not given, maps are\n+        masked automatically estimated by a `NiftiMasker`.\n+\n+    parameters: list of parameters, default is None\n+        If given, parameters are passed to `filter_and_mask` along with\n+        the provided input mask image.\n+\n+    threshold: a float (t-value, ratio), 'auto', default is 'auto'\n+        a value used to threshold the maps.\n+\n+        If float, a t-statistic threshold value of maps, the intensities\n+        which are survived above this value are kept. Most suitable if user\n+        knows exactly the values to keep.\n+\n+        If float, a ratio value between [0. and 1.], is used to multiply\n+        with the total size of voxels (ratio * n_voxels = some_voxels).\n+        The most intense voxels (some_voxels) which are survived will be kept.\n+        Most suitable for the case, if the concept of threshold should be\n+        according to total count of voxels inside the brain volume.\n+\n+        If default 'auto', pre-defined ratio 0.8 is used, which means 80%\n+        of the voxels which are survived are kept.\n+\n+    thresholding_strategy: string {None, 'ratio_n_voxels', 'percentile'} \\\n+        default 'percentile'\n+        a parameter to select between the type of determining a threshold value.\n+        It can be either based on number of voxels or score of the data based\n+        on a percentile.\n+\n+        If None, threshold value will not be determined.\n+\n+        If ratio_n_voxels, threshold value is estimated based on total size of the\n+        voxels.\n+\n+        If percentile, threshold value is determined based on the percentage\n+        score of the input data of the maps.\n+\n+    Returns\n+    -------\n+    threshold_maps_img: a Nifti like image/object\n+        a thresholded image of the input.\n+    \"\"\"\n+    maps_img = check_niimg(maps_img)\n+\n+    single_map = (len(maps_img.shape) == 3)\n+\n+    if mask_img is not None:\n+        mask_img = check_niimg_3d(mask_img)\n+        if parameters is not None:\n+            maps, affine = filter_and_mask(maps_img, mask_img, parameters)\n+        else:\n+            nifti_masker = NiftiMasker(mask_img=mask_img)\n+            maps = nifti_masker.fit_transform(maps_img)\n+    elif mask_img is None:\n+        nifti_masker = NiftiMasker(mask_img=mask_img)\n+        maps = nifti_masker.fit_transform(maps_img)\n+        mask_img = nifti_masker.mask_img_\n+\n+    ratio = None\n+    if isinstance(threshold, float):\n+        if thresholding_strategy is None:\n+            # When threshold is needed to apply directly based on\n+            # statistical values which should not be more than maximum\n+            value_check = abs(maps).max()\n+            if abs(threshold) > value_check:\n+                raise ValueError(\"The value given to threshold \"\n+                                 \"statistical maps must not exceed %d. \"\n+                                 \"You provided threshold=%s \" % (value_check,\n+                                                                 threshold))\n+            cutoff_threshold = threshold\n+        else:\n+            ratio = threshold\n+    elif threshold == 'auto':\n+        ratio = 0.8\n+    elif threshold is not None:\n+        raise ValueError(\"Threshold must be either \"\n+                         \"'auto' or float. You provided %s.\" %\n+                         str(threshold))\n+    # check if the input strategy is a valid\n+    list_of_estimators = [None, 'percentile', 'ratio_n_voxels']\n+    if thresholding_strategy not in list_of_estimators:\n+        message = (\"'thresholding_strategy' should be given as \"\n+                   \"either of these {0}\").format(list_of_estimators)\n+        raise ValueError(message)\n+\n+    # Thresholding\n+    if ratio is not None and ratio > 1.:\n+        raise ValueError(\"threshold given for a 'percentile' or 'ratio_n_voxels' \"\n+                         \"is expected between 0. and 1. \"\n+                         \"You provided %s\" % threshold)\n+\n+    if thresholding_strategy == 'percentile':\n+        percentile = 100. - (100. / len(maps)) * ratio\n+        cutoff_threshold = scoreatpercentile(np.abs(maps), percentile)\n+    elif ratio is not None and thresholding_strategy == 'ratio_n_voxels':\n+        raveled = np.abs(maps).ravel()\n+        argsort = np.argsort(raveled)\n+        n_voxels = (ratio * maps.size)\n+        cutoff_threshold = raveled[argsort[- n_voxels]]\n+\n+    maps[np.abs(maps) < cutoff_threshold] = 0.\n+    threshold_maps = maps\n+    threshold_maps_img = masking.unmask(threshold_maps, mask_img)\n+    # squeeze the image if input maps given as 3D is converted to\n+    # 4D after thresholding\n+    if single_map:\n+        data = threshold_maps_img.get_data()\n+        affine = threshold_maps_img.get_affine()\n+        threshold_maps_img = new_img_like(\n+            threshold_maps_img, data[:, :, :, 0], affine)\n+\n+    return threshold_maps_img\n+\n+\n+def break_connected_components(map_img, min_size=20,\n+                               extract_type='connected_components',\n+                               peak_local_smooth=6, mask_img=None):\n+    \"\"\" A function takes the connected components of the brain activation\n+    maps/regions and breaks each component into a seperate brain regions.\n+\n+    Parameters\n+    ----------\n+    map_img: a Nifti-like image/object\n+        a 3D image of the activation maps which should be breaked into a set\n+        of regions.\n+\n+    min_size: int, default is 20\n+        An integer which denotes the size of voxels in the each region.\n+        Only the size of the regions which are more than this number\n+        are kept.\n+\n+    extract_type: string {\"connected_components\", \"local_regions\"} \\\n+        default is connected_components\n+        A method used to segment/seperate the regions.\n+\n+        If connected_components, each component in the input image is assigned\n+        a unique label point and then seperated based on the uniqueness of those\n+        label points.\n+\n+        If local_regions, smoothing followed by random walker procedure is\n+        used to split into each a seperate regions.\n+\n+    peak_local_smooth: scalar, default is 6mm\n+        a value in mm which is used to smooth an image to locate seed points.\n+\n+    mask_img: Nifti-like image/object, default is None\n+        an option used to mask the input brain map image.\n+\n+    Returns\n+    -------\n+    regions_accumulated: a Nifti-like images\n+        contains the images of segmented regions each 3D image appended as a\n+        seperate brain activated region.\n+    \"\"\"\n+    regions_accumulated = []\n+    map_img = check_niimg(map_img)\n+    if len(map_img.shape) == 0 or len(map_img.shape) == 4:\n+        raise ValueError('A 3D Nifti image or path to a 3D image should '\n+                         'be submitted.')\n+\n+    extract_methods = ['connected_components', 'local_regions']\n+    if extract_type not in extract_methods:\n+        message = (\"'extract_type' should be given \"\n+                   \"either of these {0}\").format(extract_methods)\n+        raise ValueError(message)\n+\n+    map_data = map_img.get_data()\n+    affine = map_img.get_affine()\n+    # Mark the seeds using random walker\n+    if extract_type == 'local_regions':\n+        smooth_map_data = _smooth_array(map_data, affine, peak_local_smooth)\n+        seeds = peak_local_max(smooth_map_data, indices=False,\n+                               exclude_border=False)\n+        seeds_label, seeds_id = label(seeds)\n+        # Assign integer \"-1\" to ignore\n+        seeds_label[map_data == 0.] = -1\n+        # Take the maximum value of the data and\n+        # normalize to be between -1 and 1\n+        max_value_map = max(map_data.max(), -map_data.min())\n+        if max_value_map > 1.:\n+            map_data /= max_value_map\n+        rw_maps = random_walker(map_data, seeds_label, mode='cg_mg')\n+        # Now simply replace \"-1\" with \"0\" for regions seperation\n+        rw_maps[rw_maps == -1] = 0.\n+        maps_assigned = rw_maps\n+    else:\n+        # Taking directly the input data which is the case in 'auto' type\n+        maps_assigned = map_data\n+    # Region seperation\n+    label_maps, n_labels = label(maps_assigned)\n+    # Takes the size of each labelized region data\n+    labels_size = np.bincount(label_maps.ravel())\n+    labels_size[0] = 0.\n+    for label_id, label_size in enumerate(labels_size):\n+        if label_size > min_size:\n+            region_data = (label_maps == label_id) * map_data\n+            region_img = new_img_like(map_img, region_data)\n+            regions_accumulated.append(region_img)\n+\n+    return regions_accumulated\n+\n+\n+class RegionExtractor(NiftiMapsMasker):\n+    \"\"\" Class to decompose maps into seperated brain regions.\n+\n+    Region Extraction is a post processing technique which\n+    is implemented to automatically segment each brain atlas maps\n+    into different set of seperated brain activated region.\n+    Particularly, to show that each decomposed brain maps can be\n+    used to focus on a target specific Regions of Interest analysis.\n+\n+    Parameters\n+    ----------\n+    maps_img: Niimg-like object or path to the Niimg\n+       an image or a filename of the image which contains a set of brain\n+       atlas maps or statistically decomposed brain maps.\n+\n+    mask: Niimg-like object, instance of NiftiMasker, default is None, optional\n+        Mask to be applied on the input data. If an instance of masker is passed,\n+        then its mask is used. If no mask is provided, this class/function\n+        will automatically computes mask by NiftiMasker from the input data.\n+\n+    target_affine: 3x3 or 4x4 matrix, default is None, optional\n+        If given, while masking the image is resampled to this affine by\n+        passing the parameter to image.resample_img.\n+        Please see the related documentation for more details or\n+        http://nilearn.github.io/manipulating_visualizing/data_preparation.html\n+\n+    target_shape: 3-tuple of integers, default is None, optional\n+        If given, while masking the image is resized to match the given shape.\n+        This parameter is passed to image.resample_img.\n+        Please see the related documentation for more details or\n+        http://nilearn.github.io/manipulating_visualizing/data_preparation.html\n+\n+    standardize: boolean, True or False, default True, optional\n+        If True, the time series signals are centered and normalized by\n+        putting their mean to 0 and variance to 1. Recommended to\n+        set as True if signals are not already standardized.\n+\n+    low_pass: float, default is None, optional\n+        This value will be applied on the signals by passing to signal.clean\n+        Please see the related documentation signal.clean for more details.\n+\n+    high_pass: float, default is None, optional\n+        This value will be applied on the signals by passing to signal.clean\n+        Please see the related documentation signal.clean for more details.\n+\n+    t_r: float, default is None, optional\n+        Repetition time in sec. This value is given to signal.clean\n+        Please see the related documentation for details.\n+\n+    memory: instance of joblib.Memory, string, default is None, optional\n+        Used to cache the masking process. If a string is given, the path\n+        is set with this string as a folder name in the directory.\n+\n+    min_size: int, default size 20, optional\n+        An integer which suppresses the smallest spurious regions by selecting\n+        the regions having the size of the voxels which are more than this\n+        integer.\n+\n+    threshold: float or 'auto', default is 'auto', optional\n+        If default 'auto', we estimate a threshold with pre-defined ratio set as 0.8.\n+        The estimated threshold tells us to keep the more intense voxels within\n+        the brain volume across all maps. The threshold value is estimated by\n+        multiplying the ratio with total size of the voxels, denoted as\n+        (0.8 * n_voxels) or it can be estimated by multiplying the ratio with\n+        the total number of maps to get in a percentile.\n+\n+        If given as float, this value is replaced directly by the pre-defined\n+        set ratio 0.8.\n+\n+    threshold_strategy: string {'ratio_n_voxels', 'percentile'}, \\\n+        default is 'ratio_n_voxels', optional\n+        This parameter is to select between the type of estimating the threshold.\n+\n+        If 'ratio_n_voxels', the threshold value is estimated based on total\n+        size of voxels in the brain volume. This option tells us to keep the\n+        percentage of more intense voxels.\n+\n+        If 'percentile', the percentile threshold value is estimated by the\n+        percentage of the score to the number of maps.\n+\n+    extractor: string {'connected_components', 'local_regions'}, optional\n+        A string which chooses between the type of extractor.\n+\n+        If 'connected_components', regions are segmented using only a labels\n+        assigned to each unique region/object.\n+\n+        If 'local_regions', regions are segmented using a seed points assigned by\n+        its peak max value of that particular local regions.\n+\n+    smooth_fwhm: scalar, default smooth_fwhm=6. optional\n+        smoothing parameter as a full width half maximum, in millimetres.\n+        This scalar value is applied on all three directions (x,y,z).\n+\n+    Attributes\n+    ----------\n+    `regions_`: Niimg-like image/object\n+        a list of seperated regions with each region lying on a 3D volume\n+        concatenated into a 4D Nifti like object.\n+\n+    `index_`: a numpy array\n+        an array of list of indices where each index value is assigned to\n+        each seperate region of its corresponding family of brain maps.\n+\n+    `signals_`: a numpy array\n+        a list of averaged timeseries signals of the subjects extracted from\n+        each region.\n+\n+    References\n+    ----------\n+    * Abraham et al. \"Region segmentation for sparse decompositions: better\n+      brain parcellations from rest fMRI\", Sparsity Techniques in Medical Imaging,\n+      Sep 2014, Boston, United States. pp.8\n+    \"\"\"\n+    def __init__(self, maps_img, mask=None, target_affine=None,\n+                 target_shape=None, standardize=False, low_pass=None,\n+                 high_pass=None, t_r=None, memory=Memory(cachedir=None),\n+                 min_size=20, thresholding_strategy='ratio_n_voxels',\n+                 threshold='auto', extractor='connected_components',\n+                 peak_local_smooth=6., verbose=0):\n+        self.maps_img = maps_img\n+        self.mask = mask\n+        self.target_affine = target_affine\n+        self.target_shape = target_shape\n+        self.standardize = standardize\n+        self.low_pass = low_pass\n+        self.high_pass = high_pass\n+        self.t_r = t_r\n+        self.memory = memory\n+\n+        # parameters for region extraction\n+        self.min_size = min_size\n+        self.thresholding_strategy = thresholding_strategy\n+        self.threshold = threshold\n+        self.extractor = extractor\n+        self.peak_local_smooth = peak_local_smooth\n+\n+        self.verbose = verbose\n+\n+    def fit(self, X=None, y=None):\n+        \"\"\" Prepare or set up the data for the region extraction\n+\n+        \"\"\"\n+        self.maps_img_ = check_niimg(self.maps_img)\n+\n+        if isinstance(self.mask, NiftiMasker):\n+            self.masker_ = clone(self.mask)\n+        else:\n+            self.masker_ = NiftiMasker(mask_img=self.mask,\n+                                       target_affine=self.target_affine,\n+                                       target_shape=self.target_shape,\n+                                       standardize=False,\n+                                       low_pass=self.low_pass,\n+                                       high_pass=self.high_pass,\n+                                       mask_strategy='background',\n+                                       t_r=self.t_r,\n+                                       memory=self.memory)\n+\n+        if self.masker_.mask_img is None:\n+            self.masker_.fit(self.maps_img_)\n+        else:\n+            self.masker_.fit()\n+        self.mask_img_ = self.masker_.mask_img_\n+\n+        parameters = get_params(NiftiMasker, self)\n+        parameters['detrend'] = True\n+        # foreground extraction of input data \"maps_img\"\n+        self.threshold_maps_img_ = estimate_apply_threshold_to_maps(","path":"nilearn/regions/region_extractor.py","position":409,"original_position":409,"commit_id":"6003db09a4a6704d138f8434b6fbdf9c4060cef0","original_commit_id":"6003db09a4a6704d138f8434b6fbdf9c4060cef0","user":{"login":"KamalakerDadi","id":11410385,"avatar_url":"https://avatars.githubusercontent.com/u/11410385?v=3","gravatar_id":"","url":"https://api.github.com/users/KamalakerDadi","html_url":"https://github.com/KamalakerDadi","followers_url":"https://api.github.com/users/KamalakerDadi/followers","following_url":"https://api.github.com/users/KamalakerDadi/following{/other_user}","gists_url":"https://api.github.com/users/KamalakerDadi/gists{/gist_id}","starred_url":"https://api.github.com/users/KamalakerDadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KamalakerDadi/subscriptions","organizations_url":"https://api.github.com/users/KamalakerDadi/orgs","repos_url":"https://api.github.com/users/KamalakerDadi/repos","events_url":"https://api.github.com/users/KamalakerDadi/events{/privacy}","received_events_url":"https://api.github.com/users/KamalakerDadi/received_events","type":"User","site_admin":false},"body":"I will change accordingly based on our discussions and push a new one.","created_at":"2015-10-28T14:47:26Z","updated_at":"2015-10-28T14:47:26Z","html_url":"https://github.com/nilearn/nilearn/pull/651#discussion_r43264516","pull_request_url":"https://api.github.com/repos/nilearn/nilearn/pulls/651","_links":{"self":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/comments/43264516"},"html":{"href":"https://github.com/nilearn/nilearn/pull/651#discussion_r43264516"},"pull_request":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/651"}}},"pull_request":{"url":"https://api.github.com/repos/nilearn/nilearn/pulls/651","id":39828251,"html_url":"https://github.com/nilearn/nilearn/pull/651","diff_url":"https://github.com/nilearn/nilearn/pull/651.diff","patch_url":"https://github.com/nilearn/nilearn/pull/651.patch","issue_url":"https://api.github.com/repos/nilearn/nilearn/issues/651","number":651,"state":"open","locked":false,"title":"[MRG] Region Extractor","user":{"login":"KamalakerDadi","id":11410385,"avatar_url":"https://avatars.githubusercontent.com/u/11410385?v=3","gravatar_id":"","url":"https://api.github.com/users/KamalakerDadi","html_url":"https://github.com/KamalakerDadi","followers_url":"https://api.github.com/users/KamalakerDadi/followers","following_url":"https://api.github.com/users/KamalakerDadi/following{/other_user}","gists_url":"https://api.github.com/users/KamalakerDadi/gists{/gist_id}","starred_url":"https://api.github.com/users/KamalakerDadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KamalakerDadi/subscriptions","organizations_url":"https://api.github.com/users/KamalakerDadi/orgs","repos_url":"https://api.github.com/users/KamalakerDadi/repos","events_url":"https://api.github.com/users/KamalakerDadi/events{/privacy}","received_events_url":"https://api.github.com/users/KamalakerDadi/received_events","type":"User","site_admin":false},"body":"Fix #633 \r\nTo Do List:\r\n- [x] Foreground Extraction and Biggest Connected Component\r\n    - [x] Voxel Ratio Extractor\r\n- [x] Region Extraction\r\n    - [x] Random Walker Extraction\r\n- [x] Documentation\r\n- [x] Tests\r\n- [x] Example\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2015-07-13T16:08:17Z","updated_at":"2015-10-28T14:47:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a48591f4f231727d4b7e223f8e9652a7732dcbc9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nilearn/nilearn/pulls/651/commits","review_comments_url":"https://api.github.com/repos/nilearn/nilearn/pulls/651/comments","review_comment_url":"https://api.github.com/repos/nilearn/nilearn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nilearn/nilearn/issues/651/comments","statuses_url":"https://api.github.com/repos/nilearn/nilearn/statuses/6003db09a4a6704d138f8434b6fbdf9c4060cef0","head":{"label":"KamalakerDadi:AutoExtractor","ref":"AutoExtractor","sha":"6003db09a4a6704d138f8434b6fbdf9c4060cef0","user":{"login":"KamalakerDadi","id":11410385,"avatar_url":"https://avatars.githubusercontent.com/u/11410385?v=3","gravatar_id":"","url":"https://api.github.com/users/KamalakerDadi","html_url":"https://github.com/KamalakerDadi","followers_url":"https://api.github.com/users/KamalakerDadi/followers","following_url":"https://api.github.com/users/KamalakerDadi/following{/other_user}","gists_url":"https://api.github.com/users/KamalakerDadi/gists{/gist_id}","starred_url":"https://api.github.com/users/KamalakerDadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KamalakerDadi/subscriptions","organizations_url":"https://api.github.com/users/KamalakerDadi/orgs","repos_url":"https://api.github.com/users/KamalakerDadi/repos","events_url":"https://api.github.com/users/KamalakerDadi/events{/privacy}","received_events_url":"https://api.github.com/users/KamalakerDadi/received_events","type":"User","site_admin":false},"repo":{"id":32379132,"name":"nilearn","full_name":"KamalakerDadi/nilearn","owner":{"login":"KamalakerDadi","id":11410385,"avatar_url":"https://avatars.githubusercontent.com/u/11410385?v=3","gravatar_id":"","url":"https://api.github.com/users/KamalakerDadi","html_url":"https://github.com/KamalakerDadi","followers_url":"https://api.github.com/users/KamalakerDadi/followers","following_url":"https://api.github.com/users/KamalakerDadi/following{/other_user}","gists_url":"https://api.github.com/users/KamalakerDadi/gists{/gist_id}","starred_url":"https://api.github.com/users/KamalakerDadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KamalakerDadi/subscriptions","organizations_url":"https://api.github.com/users/KamalakerDadi/orgs","repos_url":"https://api.github.com/users/KamalakerDadi/repos","events_url":"https://api.github.com/users/KamalakerDadi/events{/privacy}","received_events_url":"https://api.github.com/users/KamalakerDadi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KamalakerDadi/nilearn","description":"Machine learning for NeuroImaging in Python","fork":true,"url":"https://api.github.com/repos/KamalakerDadi/nilearn","forks_url":"https://api.github.com/repos/KamalakerDadi/nilearn/forks","keys_url":"https://api.github.com/repos/KamalakerDadi/nilearn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KamalakerDadi/nilearn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KamalakerDadi/nilearn/teams","hooks_url":"https://api.github.com/repos/KamalakerDadi/nilearn/hooks","issue_events_url":"https://api.github.com/repos/KamalakerDadi/nilearn/issues/events{/number}","events_url":"https://api.github.com/repos/KamalakerDadi/nilearn/events","assignees_url":"https://api.github.com/repos/KamalakerDadi/nilearn/assignees{/user}","branches_url":"https://api.github.com/repos/KamalakerDadi/nilearn/branches{/branch}","tags_url":"https://api.github.com/repos/KamalakerDadi/nilearn/tags","blobs_url":"https://api.github.com/repos/KamalakerDadi/nilearn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KamalakerDadi/nilearn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KamalakerDadi/nilearn/git/refs{/sha}","trees_url":"https://api.github.com/repos/KamalakerDadi/nilearn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KamalakerDadi/nilearn/statuses/{sha}","languages_url":"https://api.github.com/repos/KamalakerDadi/nilearn/languages","stargazers_url":"https://api.github.com/repos/KamalakerDadi/nilearn/stargazers","contributors_url":"https://api.github.com/repos/KamalakerDadi/nilearn/contributors","subscribers_url":"https://api.github.com/repos/KamalakerDadi/nilearn/subscribers","subscription_url":"https://api.github.com/repos/KamalakerDadi/nilearn/subscription","commits_url":"https://api.github.com/repos/KamalakerDadi/nilearn/commits{/sha}","git_commits_url":"https://api.github.com/repos/KamalakerDadi/nilearn/git/commits{/sha}","comments_url":"https://api.github.com/repos/KamalakerDadi/nilearn/comments{/number}","issue_comment_url":"https://api.github.com/repos/KamalakerDadi/nilearn/issues/comments{/number}","contents_url":"https://api.github.com/repos/KamalakerDadi/nilearn/contents/{+path}","compare_url":"https://api.github.com/repos/KamalakerDadi/nilearn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KamalakerDadi/nilearn/merges","archive_url":"https://api.github.com/repos/KamalakerDadi/nilearn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KamalakerDadi/nilearn/downloads","issues_url":"https://api.github.com/repos/KamalakerDadi/nilearn/issues{/number}","pulls_url":"https://api.github.com/repos/KamalakerDadi/nilearn/pulls{/number}","milestones_url":"https://api.github.com/repos/KamalakerDadi/nilearn/milestones{/number}","notifications_url":"https://api.github.com/repos/KamalakerDadi/nilearn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KamalakerDadi/nilearn/labels{/name}","releases_url":"https://api.github.com/repos/KamalakerDadi/nilearn/releases{/id}","created_at":"2015-03-17T07:55:36Z","updated_at":"2015-04-29T07:58:19Z","pushed_at":"2015-10-28T14:34:18Z","git_url":"git://github.com/KamalakerDadi/nilearn.git","ssh_url":"git@github.com:KamalakerDadi/nilearn.git","clone_url":"https://github.com/KamalakerDadi/nilearn.git","svn_url":"https://github.com/KamalakerDadi/nilearn","homepage":"http://nilearn.github.io","size":8298,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nilearn:master","ref":"master","sha":"aa4ba03ff334e4ba11904d57db87b64bb4714f1e","user":{"login":"nilearn","id":4646912,"avatar_url":"https://avatars.githubusercontent.com/u/4646912?v=3","gravatar_id":"","url":"https://api.github.com/users/nilearn","html_url":"https://github.com/nilearn","followers_url":"https://api.github.com/users/nilearn/followers","following_url":"https://api.github.com/users/nilearn/following{/other_user}","gists_url":"https://api.github.com/users/nilearn/gists{/gist_id}","starred_url":"https://api.github.com/users/nilearn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilearn/subscriptions","organizations_url":"https://api.github.com/users/nilearn/orgs","repos_url":"https://api.github.com/users/nilearn/repos","events_url":"https://api.github.com/users/nilearn/events{/privacy}","received_events_url":"https://api.github.com/users/nilearn/received_events","type":"Organization","site_admin":false},"repo":{"id":1235740,"name":"nilearn","full_name":"nilearn/nilearn","owner":{"login":"nilearn","id":4646912,"avatar_url":"https://avatars.githubusercontent.com/u/4646912?v=3","gravatar_id":"","url":"https://api.github.com/users/nilearn","html_url":"https://github.com/nilearn","followers_url":"https://api.github.com/users/nilearn/followers","following_url":"https://api.github.com/users/nilearn/following{/other_user}","gists_url":"https://api.github.com/users/nilearn/gists{/gist_id}","starred_url":"https://api.github.com/users/nilearn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilearn/subscriptions","organizations_url":"https://api.github.com/users/nilearn/orgs","repos_url":"https://api.github.com/users/nilearn/repos","events_url":"https://api.github.com/users/nilearn/events{/privacy}","received_events_url":"https://api.github.com/users/nilearn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nilearn/nilearn","description":"Machine learning for NeuroImaging in Python","fork":false,"url":"https://api.github.com/repos/nilearn/nilearn","forks_url":"https://api.github.com/repos/nilearn/nilearn/forks","keys_url":"https://api.github.com/repos/nilearn/nilearn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nilearn/nilearn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nilearn/nilearn/teams","hooks_url":"https://api.github.com/repos/nilearn/nilearn/hooks","issue_events_url":"https://api.github.com/repos/nilearn/nilearn/issues/events{/number}","events_url":"https://api.github.com/repos/nilearn/nilearn/events","assignees_url":"https://api.github.com/repos/nilearn/nilearn/assignees{/user}","branches_url":"https://api.github.com/repos/nilearn/nilearn/branches{/branch}","tags_url":"https://api.github.com/repos/nilearn/nilearn/tags","blobs_url":"https://api.github.com/repos/nilearn/nilearn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nilearn/nilearn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nilearn/nilearn/git/refs{/sha}","trees_url":"https://api.github.com/repos/nilearn/nilearn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nilearn/nilearn/statuses/{sha}","languages_url":"https://api.github.com/repos/nilearn/nilearn/languages","stargazers_url":"https://api.github.com/repos/nilearn/nilearn/stargazers","contributors_url":"https://api.github.com/repos/nilearn/nilearn/contributors","subscribers_url":"https://api.github.com/repos/nilearn/nilearn/subscribers","subscription_url":"https://api.github.com/repos/nilearn/nilearn/subscription","commits_url":"https://api.github.com/repos/nilearn/nilearn/commits{/sha}","git_commits_url":"https://api.github.com/repos/nilearn/nilearn/git/commits{/sha}","comments_url":"https://api.github.com/repos/nilearn/nilearn/comments{/number}","issue_comment_url":"https://api.github.com/repos/nilearn/nilearn/issues/comments{/number}","contents_url":"https://api.github.com/repos/nilearn/nilearn/contents/{+path}","compare_url":"https://api.github.com/repos/nilearn/nilearn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nilearn/nilearn/merges","archive_url":"https://api.github.com/repos/nilearn/nilearn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nilearn/nilearn/downloads","issues_url":"https://api.github.com/repos/nilearn/nilearn/issues{/number}","pulls_url":"https://api.github.com/repos/nilearn/nilearn/pulls{/number}","milestones_url":"https://api.github.com/repos/nilearn/nilearn/milestones{/number}","notifications_url":"https://api.github.com/repos/nilearn/nilearn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nilearn/nilearn/labels{/name}","releases_url":"https://api.github.com/repos/nilearn/nilearn/releases{/id}","created_at":"2011-01-09T19:02:23Z","updated_at":"2015-10-25T21:54:27Z","pushed_at":"2015-10-28T14:45:01Z","git_url":"git://github.com/nilearn/nilearn.git","ssh_url":"git@github.com:nilearn/nilearn.git","clone_url":"https://github.com/nilearn/nilearn.git","svn_url":"https://github.com/nilearn/nilearn","homepage":"http://nilearn.github.io","size":15021,"stargazers_count":119,"watchers_count":119,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":87,"forks":85,"open_issues":87,"watchers":119,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/651"},"html":{"href":"https://github.com/nilearn/nilearn/pull/651"},"issue":{"href":"https://api.github.com/repos/nilearn/nilearn/issues/651"},"comments":{"href":"https://api.github.com/repos/nilearn/nilearn/issues/651/comments"},"review_comments":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/651/comments"},"review_comment":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nilearn/nilearn/pulls/651/commits"},"statuses":{"href":"https://api.github.com/repos/nilearn/nilearn/statuses/6003db09a4a6704d138f8434b6fbdf9c4060cef0"}}}}