summaryrefslogtreecommitdiffstats
path: root/python/astra/extrautils.pyx
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2017-02-09 18:01:03 +0100
committerGitHub <noreply@github.com>2017-02-09 18:01:03 +0100
commit981d6adc0e3c98a67403b92b1ec4cdb881c62fda (patch)
treecccde0fd4a3a2d92919338df4e162c9abfd079e1 /python/astra/extrautils.pyx
parent03c3e5b5043cc8cba9aceeb8641d497edd1be7cf (diff)
parent4c665b0d5af3841f20501a5dc01a23e671367856 (diff)
downloadastra-981d6adc0e3c98a67403b92b1ec4cdb881c62fda.tar.gz
astra-981d6adc0e3c98a67403b92b1ec4cdb881c62fda.tar.bz2
astra-981d6adc0e3c98a67403b92b1ec4cdb881c62fda.tar.xz
astra-981d6adc0e3c98a67403b92b1ec4cdb881c62fda.zip
Merge pull request #93 from wjp/GPULink
GPULink support
Diffstat (limited to 'python/astra/extrautils.pyx')
-rw-r--r--python/astra/extrautils.pyx32
1 files changed, 16 insertions, 16 deletions
diff --git a/python/astra/extrautils.pyx b/python/astra/extrautils.pyx
index 502cc78..248c6ee 100644
--- a/python/astra/extrautils.pyx
+++ b/python/astra/extrautils.pyx
@@ -26,19 +26,19 @@
def clipCircle(img):
- cdef int i,j
- cdef double x2,y2,mid,bnd
- cdef long sz,sz2
- sz = img.shape[0]
- sz2 = sz*sz
- bnd = sz2/4.
- mid = (sz-1.)/2.
- nDel=0
- for i in range(sz):
- for j in range(sz):
- x2 = (i-mid)*(i-mid)
- y2 = (j-mid)*(j-mid)
- if x2+y2>bnd:
- img[i,j]=0
- nDel=nDel+1
- return nDel
+ cdef int i,j
+ cdef double x2,y2,mid,bnd
+ cdef long sz,sz2
+ sz = img.shape[0]
+ sz2 = sz*sz
+ bnd = sz2/4.
+ mid = (sz-1.)/2.
+ nDel=0
+ for i in range(sz):
+ for j in range(sz):
+ x2 = (i-mid)*(i-mid)
+ y2 = (j-mid)*(j-mid)
+ if x2+y2>bnd:
+ img[i,j]=0
+ nDel=nDel+1
+ return nDel