GitHub PullRequestReviewCommentEvent at 2014-02-24 17:26:56
Repository: dipy
Actor: arokem
Payload: {"comment":{"url":"https://api.github.com/repos/nipy/dipy/pulls/comments/10000284","id":10000284,"diff_hunk":"@@ -0,0 +1,52 @@\n+from __future__ import division, print_function\n+\n+import numpy as np\n+from dipy.denoise.denspeed import nlmeans_3d\n+\n+\n+def nlmeans(arr, sigma, mask=None, patch_radius=1, block_radius=5, rician=True):\n+    \"\"\" Non-local means for denoising 3D and 4D images\n+\n+    Parameters\n+    ----------\n+    arr : 3D or 4D ndarray\n+        The array to be denoised\n+    mask : 3D ndarray\n+    sigma : float\n+        standard deviation of the noise estimated from the data\n+    patch_radius : int\n+        patch size is ``2 x patch_radius + 1``. Default is 1.\n+    block_radius : int\n+        block size is ``2 x block_radius + 1``. Default is 5.\n+    rician : boolean\n+        If True the noise is estimated as Rician, otherwise Gaussian noise\n+        is assumed.\n+\n+    Returns\n+    -------\n+    denoised_arr : ndarray\n+        the denoised ``arr`` which has the same shape as ``arr``.\n+\n+    \"\"\"\n+\n+    if arr.ndim == 3:\n+\n+        return nlmeans_3d(arr, mask, sigma,\n+                          patch_radius, block_radius,\n+                          rician).astype(arr.dtype)\n+\n+    if arr.ndim == 4:","path":"dipy/denoise/nlmeans.py","position":38,"original_position":38,"commit_id":"738d85531714eafd1a702794187918a82e829dcb","original_commit_id":"738d85531714eafd1a702794187918a82e829dcb","user":{"login":"arokem","id":118582,"avatar_url":"https://gravatar.com/avatar/005984539a2affe10d5af3aa55665636?d=https%3A%2F%2Fidenticons.github.com%2Ff0512c9fd83d905a40e0943ada9b218f.png&r=x","gravatar_id":"005984539a2affe10d5af3aa55665636","url":"https://api.github.com/users/arokem","html_url":"https://github.com/arokem","followers_url":"https://api.github.com/users/arokem/followers","following_url":"https://api.github.com/users/arokem/following{/other_user}","gists_url":"https://api.github.com/users/arokem/gists{/gist_id}","starred_url":"https://api.github.com/users/arokem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arokem/subscriptions","organizations_url":"https://api.github.com/users/arokem/orgs","repos_url":"https://api.github.com/users/arokem/repos","events_url":"https://api.github.com/users/arokem/events{/privacy}","received_events_url":"https://api.github.com/users/arokem/received_events","type":"User","site_admin":false},"body":"OK - this makes sense","created_at":"2014-02-24T17:26:56Z","updated_at":"2014-02-24T17:26:56Z","html_url":"https://github.com/nipy/dipy/pull/320#discussion_r10000284","pull_request_url":"https://api.github.com/repos/nipy/dipy/pulls/320","_links":{"self":{"href":"https://api.github.com/repos/nipy/dipy/pulls/comments/10000284"},"html":{"href":"https://github.com/nipy/dipy/pull/320#discussion_r10000284"},"pull_request":{"href":"https://api.github.com/repos/nipy/dipy/pulls/320"}}}}